code: def generate_requests(hosts, jolokia_port, jolokia_prefix):
      
      session = FuturesSession()
      for host in hosts:
          url = "http://{host}:{port}/{prefix}/read/{key}".format(
              host=host,
              port=jolokia_port,
              prefix=jolokia_prefix,
              key=UNDER_REPL_KEY,
          )
          yield host, session.get(url)
docs: Return a generator of requests to fetch the under replicated
      partition number from the specified hosts.
  
      :param hosts: list of brokers ip addresses
      :type hosts: list of strings
      :param jolokia_port: HTTP port for Jolokia
      :type jolokia_port: integer
      :param jolokia_prefix: HTTP prefix on the server for the Jolokia queries
      :type jolokia_prefix: string
      :returns: generator of requests