private static PsiNamedElement fetchContainer(@NotNull PsiMethod element) {
    PsiClass aClass = element.getContainingClass();
    return aClass == null ? element.getContainingFile() : aClass;
  }
private static PsiNamedElement fetchContainer(@NotNull PsiMethod element)