PyElement (final PsiElement element) { return element instanceof PyFile || element instanceof PyStatementList ? (PyElement)element : PsiTreeUtil.getParentOfType(element, PyFile.class, PyStatementList.class); }