code: public static Resource wrap(@NotNull Resource resource) {
      return wrap(resource, resource.getValueMap(), resource.getChildren());
    }
docs: Wrap a real resource and create a synthetic resource out of it.
  @param resource Real resource
  @return Resource