void (@NotNull PsiElement parentForScope, @Nullable PsiElement newParentScope) { processPending((pendingScope, instruction) -> { if (pendingScope != null && PsiTreeUtil.isAncestor(parentForScope, pendingScope, false)) { addPendingEdge(newParentScope, instruction); } else { addPendingEdge(pendingScope, instruction); } }); }