code: public static <N, V> ImmutableValueGraph<N, V> copyOf(ValueGraph<N, V> graph) {
      return (graph instanceof ImmutableValueGraph)
          ? (ImmutableValueGraph<N, V>) graph
          : new ImmutableValueGraph<N, V>(graph);
    }
docs: Returns an immutable copy of {@code graph}.