@Override
  public @NotNull <Node> Collection<Node> findNodesWhichBelongToAnyPathBetweenTwoNodes(
    @NotNull Graph<Node> graph,
    @NotNull Node start,
    @NotNull Node finish
  ) {
    final Set<Node> reachableFromStart = new HashSet<>();
    final Set<Node> leadToFinish = new HashSet<>();

    Dfs.performDfs(graph, start, reachableFromStart::add);
    Dfs.performDfs(invertEdgeDirections(graph), finish, leadToFinish::add);

    return ContainerUtil.intersection(reachableFromStart, leadToFinish);
  }
@Override
  public @NotNull <Node> Collection<Node> findNodesWhichBelongToAnyPathBetweenTwoNodes(
    @NotNull Graph<Node> graph,
    @NotNull Node start,
    @NotNull Node finish
  )