code: public static List<HostAndPort> hostAndPorts(AbstractConfig config, String key) {
      return hostAndPorts(config, key, null);
    }
docs: Method is used to parse hosts and ports
  
  @param config
  @param key
  @return