@Nullable
  protected static <T extends StubBasedPsiElement<? extends PyTypeCommentOwnerStub> & PyTypeCommentOwner>
  String getTypeCommentAnnotationFromStubOrPsi(@NotNull T elem) {
    final PyTypeCommentOwnerStub stub = elem.getStub();
    if (stub != null) {
      return stub.getTypeComment();
    }
    final PsiComment comment = elem.getTypeComment();
    if (comment != null) {
      return PyTypingTypeProvider.getTypeCommentValue(comment.getText());
    }
    return null;
  }
@Nullable
  protected static <T extends StubBasedPsiElement<? extends PyTypeCommentOwnerStub> & PyTypeCommentOwner>
  String getTypeCommentAnnotationFromStubOrPsi(@NotNull T elem)