String (String name, PsiElement psiElement) { if (isDefinedInScope(name, psiElement) || isDefinedInScope(name, psiElement.getContainingFile())) { return PyPsiBundle.message("refactoring.introduce.constant.scope.error"); } return null; }