private static <I, V> Node<V> add(@NotNull Map<I, Node<V>> tree, @NotNull I id, Object child) {
      Node<V> node = get(tree, id);
      if (node.myChildren == null) {
        node.myChildren = new SmartList<>();
      }
      node.myChildren.add(child);
      return node;
    }
private static <I, V> Node<V> add(@NotNull Map<I, Node<V>> tree, @NotNull I id, Object child)