public @Nullable <DataType> DataType findNode(Class<DataType> aClass, @NotNull Function<? super ExternalSystemNode<?>, Object> map) {
    ExternalSystemNode<?> node = this;
    while (node != null) {
      var data = map.apply(node);
      if (aClass.isInstance(data)) {
        //noinspection unchecked
        return (DataType)data;
      }
      node = node.myParent;
    }
    return null;
  }
public @Nullable <DataType> DataType findNode(Class<DataType> aClass, @NotNull Function<? super ExternalSystemNode<?>, Object> map)