code: public InvalidKeys getInvalidKeys(DependencyExplorerOutput output) {
      Map<Key<?>, String> allInvalidKeys = getAllInvalidKeys(output);
      Set<Key<?>> optionalInvalidKeys = removeOptionalKeys(output, allInvalidKeys);
      optionalInvalidKeys = getKeysToRemove(output.getGraph(), optionalInvalidKeys);
      return new InvalidKeys(allInvalidKeys, optionalInvalidKeys);
    }
docs: Returns an {@link InvalidKeys} object containing information about all the errors that we
  discovered in required keys, and the set of all optional bindings that should be removed from
  the graph in order to make it valid.