code: function pruneGraphs(graph, graphOptions) {
    return currentGraph => {
      pruneRelatedBranches(graph, currentGraph, graphOptions);
  
      if (!graphOptions.isInsertOnly()) {
        pruneDeletedBranches(graph, currentGraph);
      }
  
      return currentGraph;
    };
  }
docs: Remove branches from the graph that require no operations. For example we never want to do anything for descendant nodes of a node that is deleted or unrelated. We never delete recursively.