@NotNull
  public static SortIndexMap createBekMap(@NotNull LinearGraph permanentGraph,
                                          @NotNull GraphLayoutImpl graphLayout,
                                          @NotNull TimestampGetter timestampGetter) {
    BekBranchCreator bekBranchCreator = new BekBranchCreator(permanentGraph, graphLayout);
    Pair<List<BekBranch>, BekEdgeRestrictions> branches = bekBranchCreator.getResult();

    BekBranchMerger bekBranchMerger = new BekBranchMerger(branches.first, branches.second, timestampGetter);
    List<Integer> result = bekBranchMerger.getResult();

    LOG.assertTrue(result.size() == permanentGraph.nodesCount());
    return SortIndexMap.createFromSortedList(result);
  }
@NotNull
  public static SortIndexMap createBekMap(@NotNull LinearGraph permanentGraph,
                                          @NotNull GraphLayoutImpl graphLayout,
                                          @NotNull TimestampGetter timestampGetter)