@Contract("null -> null")
  public static @Nullable PsiElement getStubOrPsiParent(@Nullable PsiElement element) {
    if (element instanceof StubBasedPsiElement) {
      StubElement<?> stub = ((StubBasedPsiElement<?>)element).getStub();
      if (stub != null) {
        StubElement<?> parentStub = stub.getParentStub();
        return parentStub != null ? parentStub.getPsi() : null;
      }
    }
    return element != null ? element.getParent() : null;
  }
@Contract("null -> null")
  public static @Nullable PsiElement getStubOrPsiParent(@Nullable PsiElement element)