code: public static ResourcePoolsBuilder newResourcePoolsBuilder(ResourcePools pools) {
      ResourcePoolsBuilder poolsBuilder = new ResourcePoolsBuilder();
      for (ResourceType<?> currentResourceType : pools.getResourceTypeSet()) {
        poolsBuilder = poolsBuilder.with(pools.getPoolForResource(currentResourceType));
      }
      return poolsBuilder;
    }
docs: Convenience method to get a builder from an existing {@link ResourcePools}.
  
  @param pools the resource pools to build from
  @return a new builder with configuration matching the provided resource pools