code: public static <T> List<T> toposort(List<T> inputs,
              T root, final Deps<T> deps, boolean isFullCut) {
          // Get inputs as a set.
          final HashSet<T> inputSet = new HashSet<T>(inputs);
          if (inputSet.size() != inputs.size()) {
              throw new IllegalStateException("Multiple copies of module in inputs list: " + inputs);
          }
          return toposort(inputSet, root, deps, isFullCut);
      }
docs: Gets a topological sort for the graph, where the depth-first search is cutoff by an input set.
  
  @param inputs The input set which is excluded from the graph.
  @param root The root of the graph.
  @param deps Functional description of the graph's dependencies.
  @param isFullCut Whether the input set is a full cut of the graph.
  @return The topological sort.