public static <T> T newDerivedClient(
            T client, Function<? super ClientOptions, ClientOptions> configurator) {
        final ClientBuilderParams params = builderParams(client);
        final ClientOptions newOptions = configurator.apply(params.options());
        final ClientBuilderParams newParams = params.paramsBuilder()
                                                    .options(newOptions)
                                                    .build();
        return newDerivedClient(newOptions, newParams);
    }
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
WebClient derivedWebClient = Clients.newDerivedClient(webClient, options -> {
    ClientOptionsBuilder builder = options.toBuilder();
    builder.decorator(...); // Add a decorator.
    builder.addHeader(...); // 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
core/src/main/java/com/linecorp/armeria/client/Clients.java