boolean (@NotNull final PsiElement element) { return StreamEx.of(myAllMovedElements). map(SmartPsiElementPointer::getElement) .nonNull() .map(PyMoveModuleMembersHelper::expandNamedElementBody) .anyMatch(moved -> PsiTreeUtil.isAncestor(moved, element, false)); }