public static NetworkClient createNetworkClient(AbstractConfig config,
                                                    Metrics metrics,
                                                    String metricsGroupPrefix,
                                                    LogContext logContext,
                                                    ApiVersions apiVersions,
                                                    Time time,
                                                    int maxInFlightRequestsPerConnection,
                                                    Metadata metadata,
                                                    Sensor throttleTimeSensor,
                                                    ClientTelemetrySender clientTelemetrySender) {
        return createNetworkClient(config,
                config.getString(CommonClientConfigs.CLIENT_ID_CONFIG),
                metrics,
                metricsGroupPrefix,
                logContext,
                apiVersions,
                time,
                maxInFlightRequestsPerConnection,
                config.getInt(CommonClientConfigs.REQUEST_TIMEOUT_MS_CONFIG),
                metadata,
                null,
                new DefaultHostResolver(),
                throttleTimeSensor,
                clientTelemetrySender);
    }
Return a list containing the first address in `allAddresses` and subsequent addresses
that are a subtype of the first address.

The outcome is that all returned addresses are either IPv4 or IPv6 (InetAddress has two
subclasses: Inet4Address and Inet6Address).
clients/src/main/java/org/apache/kafka/clients/ClientUtils.java