'Retrieves the clients for a hunt.'

def Handle(self, args, token=None):

    hunt_urn = args.hunt_id.ToURN()
    hunt = aff4.FACTORY.Open(hunt_urn, aff4_type=implementation.GRRHunt, token=token)
    clients_by_status = hunt.GetClientsByStatus()
    hunt_clients = clients_by_status[args.client_status.name]
    total_count = len(hunt_clients)
    if args.count:
        hunt_clients = sorted(hunt_clients)[args.offset:(args.offset + args.count)]
    else:
        hunt_clients = sorted(hunt_clients)[args.offset:]
    top_level_flow_urns = implementation.GRRHunt.GetAllSubflowUrns(hunt_urn, hunt_clients, top_level_only=True, token=token)
    top_level_flows = list(aff4.FACTORY.MultiOpen(top_level_flow_urns, aff4_type=flow.GRRFlow, token=token))
    results = []
    for flow_fd in sorted(top_level_flows, key=(lambda f: f.urn)):
        runner = flow_fd.GetRunner()
        item = ApiHuntClient(client_id=flow_fd.client_id, flow_urn=flow_fd.urn, cpu_usage=runner.context.client_resources.cpu_usage, network_bytes_sent=runner.context.network_bytes_sent)
        results.append(item)
    self.IncludeRequestInformationInResults(hunt_urn, results, token=token)
    return ApiListHuntClientsResult(items=results, total_count=total_count)
