@Override
  protected boolean checkIntroduceContext(PsiFile file, Editor editor, PsiElement element) {
    if (element != null && isInStaticMethod(element)) {
      CommonRefactoringUtil.showErrorHint(file.getProject(), editor,
                                          PyBundle.message("refactoring.introduce.field.cannot.be.used.in.static.methods"),
                                          RefactoringBundle.message("introduce.field.title"),
                                          "refactoring.extractMethod");
      return false;
    }
    return super.checkIntroduceContext(file, editor, element);
  }
@Override
  protected boolean checkIntroduceContext(PsiFile file, Editor editor, PsiElement element)