code: public static <T> T newDerivedClient(
              T client, Function<? super ClientOptions, ClientOptions> configurator) {
          final ClientBuilderParams params = builderParams(client);
          final ClientBuilder builder = new ClientBuilder(params.uri());
          builder.factory(params.factory());
          builder.options(configurator.apply(params.options()));
  
          return newDerivedClient(builder, params.clientType());
      }
docs: Creates a new derived client that connects to the same {@link URI} with the specified {@code client}
  but with different {@link ClientOption}s. For example:
  
  <pre>{@code
  HttpClient derivedHttpClient = Clients.newDerivedClient(httpClient, options -> {
  ClientOptionsBuilder builder = new ClientOptionsBuilder(options);
  builder.decorator(...);  // Add a decorator.
  builder.addHttpHeader(...); // Add an HTTP header.
  return builder.build();
  });
  }</pre>
  
  @param configurator a {@link Function} whose input is the original {@link ClientOptions} of the client
  being derived from and whose output is the {@link ClientOptions} of the new derived
  client
  
  @see ClientBuilder ClientBuilder, for more information about how the base options and
  additional options are merged when a derived client is created.
  @see ClientOptionsBuilder