def _GetHWInfos(client_list, batch_size=10000, token=None):

  # This function returns a dict mapping each client_id to a set of reported
  # hardware serial numbers reported by this client.
  hw_infos = {}

  logging.info("%d clients to process.", len(client_list))

  c = 0

  for batch in utils.Grouper(client_list, batch_size):
    logging.info("Processing batch: %d-%d", c, c + batch_size)
    c += len(batch)

    client_objs = aff4.FACTORY.MultiOpen(batch, age=aff4.ALL_TIMES, token=token)

    for client in client_objs:
      hwi = client.GetValuesForAttribute(client.Schema.HARDWARE_INFO)

      hw_infos[client.urn] = set(["%s" % x.serial_number for x in hwi])

  return hw_infos
Returns elements of links in order, non-egg links first, egg links
dataset/ETHPy150Open google/grr/grr/lib/console_utils.py/_GetHWInfos--crossover with--dataset/ETHPy150Open pypa/pip/pip/index.py/PackageFinder._sort_links