@SuppressWarnings("unchecked")
  private void initState(@NotNull Consumer<? super List<Node>> consumer) {
    myCycleConsumer = consumer;
    myIToV = (Node[])myGraph.getNodes().toArray();
    myVToI = new HashMap<>();
    myBlocked = new HashSet<>();
    myBSets = new HashMap<>();
    myStack = new ArrayDeque<>();

    for (int i = 0; i < myIToV.length; i++) {
      myVToI.put(myIToV[i], i);
    }
  }
@SuppressWarnings("unchecked")
  private void initState(@NotNull Consumer<? super List<Node>> consumer)