def get_locations_and_children(location_ids):
    return SQLLocation.objects.get_queryset_descendants(
        SQLLocation.objects.filter(location_id__in=location_ids),
        include_self=True
    )
Takes a set of location ids and returns a django queryset of those
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/locations/util.py/get_locations_and_children