public static boolean isInsideStub(@NotNull PsiElement element) {
    PsiFile file = element.getContainingFile();
    return file != null && file.getFileType() == PyiFileType.INSTANCE;
  }
public static boolean isInsideStub(@NotNull PsiElement element)