code: public static <N, E> ImmutableNetwork<N, E> copyOf(Network<N, E> network) {
      return (network instanceof ImmutableNetwork)
          ? (ImmutableNetwork<N, E>) network
          : new ImmutableNetwork<N, E>(network);
    }
docs: Returns an immutable copy of {@code network}.