@Nullable
  private static String getName(@NotNull PsiElement element) {
    if (element instanceof PsiNamedElement) {
      return ((PsiNamedElement)element).getName();
    }
    else if (element instanceof PyImportElement) {
      return ((PyImportElement)element).getVisibleName();
    }
    else if (element instanceof PyElement) {
      return ((PyElement)element).getName();
    }
    return null;
  }
@Nullable
  private static String getName(@NotNull PsiElement element)