boolean (PsiElement[] elements, @Nullable PsiElement targetContainer, @Nullable PsiReference reference) { if (targetContainer != null && !super.canMove(elements, targetContainer, reference)) { return false; } // Local function or method if (isMovableLocalFunctionOrMethod(elements[0])) { return true; } // Top-level module member for (PsiElement element : elements) { if (!PyMoveModuleMembersHelper.isMovableModuleMember(element)) { return false; } } return true; }