'Retrieve a set of documents by their ids.
:param object_ids: a list or tuple of ``ObjectId``\ s
:rtype: dict of ObjectIds as keys and collection-specific
Document subclasses as values.
.. versionadded:: 0.3'

def in_bulk(self, object_ids):

    doc_map = {}
    docs = self._collection.find({'_id': {'$in': object_ids}}, **self._cursor_args)
    if self._scalar:
        for doc in docs:
            doc_map[doc['_id']] = self._get_scalar(self._document._from_son(doc, only_fields=self.only_fields))
    elif self._as_pymongo:
        for doc in docs:
            doc_map[doc['_id']] = self._get_as_pymongo(doc)
    else:
        for doc in docs:
            doc_map[doc['_id']] = self._document._from_son(doc, only_fields=self.only_fields, _auto_dereference=self._auto_dereference)
    return doc_map
