private static @Nullable DataNode<?> findInQueue(@NotNull Queue<DataNode<?>> queue,
                                                   @NotNull Predicate<? super DataNode<?>> predicate) {
    while (!queue.isEmpty()) {
      DataNode<?> node = queue.remove();
      if (predicate.test(node)) {
        return node;
      }
      queue.addAll(node.getChildren());
    }
    return null;
  }
private static @Nullable DataNode<?> findInQueue(@NotNull Queue<DataNode<?>> queue,
                                                   @NotNull Predicate<? super DataNode<?>> predicate)