code: public static <T> void checkIsFullCut(Set<T> inputSet, T root, Deps<T> deps) {
          // Check that the input set defines a full cut through the graph with outMod as root.
          HashSet<T> visited = new HashSet<T>();        
          // Mark the inputSet as visited. If it is a valid leaf set, then leaves will be empty upon
          // completion of the DFS.
          visited.addAll(inputSet);
          HashSet<T> leaves = dfs(root, visited, deps);
          if (leaves.size() != 0) {
              throw new IllegalStateException("Input set is not a valid leaf set for the given output module. Extra leaves: " + leaves);
          }
      }
docs: Checks that the given inputSet defines a full cut through the graph rooted at the given root.