PsiElement (@Nullable PsiElement element) { if (!(element instanceof PyElement)) return null; PsiElement result = PyiUtil.getPythonStub((PyElement)element); return result != element ? result : null; }