code: public void pruneInvalidOptional(DependencyExplorerOutput output, InvalidKeys invalidKeys) {   
      DependencyGraph.GraphPruner prunedGraph = new DependencyGraph.GraphPruner(output.getGraph());
      for (Key<?> key : invalidKeys.getInvalidOptionalKeys()) {
        prunedGraph.remove(key);
        output.removeBinding(key);
      }
      output.setGraph(prunedGraph.update());
    }
docs: Prune all of the invalid optional keys from the graph.  After this method, all of the keys
  remaining in the graph are resolvable.