docs: def GetClientURNsForHostnames(hostnames, token=None):
    """Gets all client_ids for a given list of hostnames or FQDNS.
  
    Args:
      hostnames: A list of hostnames / FQDNs.
      token: An ACL token.
  
    Returns:
      A dict with a list of all known GRR client_ids for each hostname.
    """
  
    if data_store.RelationalDBEnabled():
      index = ClientIndex()
    else:
      index = CreateClientIndex(token=token)
  
    keywords = set()
    for hostname in hostnames:
      if hostname.startswith("host:"):
        keywords.add(hostname)
      else:
        keywords.add("host:%s" % hostname)
    results = index.ReadClientPostingLists(keywords)
  
    result = {}
    for keyword, hits in iteritems(results):
      result[keyword[len("host:"):]] = hits
    return result