def METHOD_NAME(domain, location_ids):
    """
    Creates a generator for iterating through the user ids of the all the
    mobile workers in the given domain whose primary location is given in
    the list of location_ids.
    Retrieves the information from couch instead of elasticsearch.
    """
    for location_id in location_ids:
        for user_id in get_user_ids_by_location(domain, location_id):
            yield user_id