private static @Nullable PsiElement getContainerByStub(@NotNull StubBasedPsiElement element) {
    final StubElement stub = element.getStub();
    if (stub != null) {
      final StubElement parentStub = stub.getParentStub();
      if (parentStub != null) {
        return parentStub.getPsi();
      }
    }
    return null;
  }
private static @Nullable PsiElement getContainerByStub(@NotNull StubBasedPsiElement element)