docs: public static <N, E> Network<N, E> transpose(Network<N, E> network) {
      if (!network.isDirected()) {
        return network; // the transpose of an undirected network is an identical network
      }
  
      if (network instanceof TransposedNetwork) {
        return ((TransposedNetwork<N, E>) network).network;
      }
  
      return new TransposedNetwork<N, E>(network);
    }