@Override
  public boolean isInContext(@NotNull TemplateActionContext templateActionContext) {
    PsiFile file = templateActionContext.getFile();
    if (isPythonLanguage(file, templateActionContext.getStartOffset())) {
      final PsiElement element = file.findElementAt(templateActionContext.getStartOffset());
      if (element != null) {
        if (!templateActionContext.isSurrounding()) {
          if (isAfterDot(element) || element instanceof PsiComment || isInsideStringLiteral(element) || isInsideParameterList(element)) {
            return false;
          }
        }
        return isInContext(element);
      }
    }
    return false;
  }
@Override
  public boolean isInContext(@NotNull TemplateActionContext templateActionContext)