code: public static HostAndPort hostAndPort(AbstractConfig config, String key, Integer defaultPort) {
      final String input = config.getString(key);
      return hostAndPort(input, defaultPort);
    }
docs: Method is used to parse a string ConfigDef item to a HostAndPort
  
  @param config      Config to read from
  @param key         ConfigItem to get the host string from.
  @param defaultPort The default port to use if a port was not specified. Can be null.
  @return HostAndPort based on the ConfigItem.