'Returns a dictionary mapping each of the given IDs to the object with
that ID.'

def in_bulk(self, id_list):

    assert self.query.can_filter(), "Cannot    use    'limit'    or    'offset'    with    in_bulk"
    if (not id_list):
        return {}
    qs = self.filter(pk__in=id_list).order_by()
    return dict([(obj._get_pk_val(), obj) for obj in qs])
