PyStatement (PyElement candidate) { final PsiElement parent = candidate.getParent(); return parent instanceof PyAssignmentStatement || parent instanceof PyAugAssignmentStatement ? (PyStatement)parent : null; }