public static @Nullable PsiElement releaseMark(@NotNull PsiElement root, @NotNull Object marker) {
    ASTNode node = root.getNode();
    if (marker.equals(node.getCopyableUserData(MARKER))) {
      node.putCopyableUserData(MARKER, null);
      return root;
    }
    else {
      PsiElement child = root.getFirstChild();
      while (child != null) {
        PsiElement result = releaseMark(child, marker);
        if (result != null) return result;
        child = child.getNextSibling();
      }
      return null;
    }
  }
public static @Nullable PsiElement releaseMark(@NotNull PsiElement root, @NotNull Object marker)