@Override
    public Graph<N> asGraph() {
      return new Graph<N>() {
        @Override
        public @NotNull Collection<N> getNodes() {
          return nodes();
        }

        @Override
        public @NotNull Iterator<N> getIn(N n) {
          return predecessors(n).iterator();
        }

        @Override
        public @NotNull Iterator<N> getOut(N n) {
          return successors(n).iterator();
        }
      };
    }
@Override
    public Graph<N> asGraph()