code: static <N> EndpointPair<N> of(Network<?, ?> network, N nodeU, N nodeV) {
      return network.isDirected() ? ordered(nodeU, nodeV) : unordered(nodeU, nodeV);
    }
docs: Returns an {@link EndpointPair} representing the endpoints of an edge in {@code network}.