code: public static <T> List<T> toposort(final Set<T> inputSet, T root, final Deps<T> deps, boolean isFullCut) {
          // Check that inputs set is a valid set of leaves for the given output module.
          checkAreDescendentsOf(inputSet, root, deps);
          if (isFullCut) {
              checkIsFullCut(inputSet, root, deps);
          }
          Deps<T> cutoffDeps = getCutoffDeps(inputSet, deps);
          return Toposort.toposort(root, cutoffDeps);
      }
docs: Gets a topological sort for the graph, where the depth-first search is cutoff by an input set.
  
  @param inputSet 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.