code: public UndirectedMultigraph<T> subgraph(Set<Integer> subset, Set<T> edgeTypes) {
          if (edgeTypes.isEmpty()) 
              throw new IllegalArgumentException("Must specify at least one type");
          if (!typeCounts.keySet().containsAll(edgeTypes)) {
              throw new IllegalArgumentException(
                  "Cannot create subgraph with more types than exist");
          }
          Subgraph sub = new Subgraph(edgeTypes, subset);
          subgraphs.add(new WeakReference<Subgraph>(sub));
          return sub;
      }
docs: {@inheritDoc}