'Handles dereferencing of :class:`~bson.dbref.DBRef` objects or
:class:`~bson.object_id.ObjectId` a maximum depth in order to cut down
the number queries to mongodb.
.. versionadded:: 0.5'

def select_related(self, max_depth=1):

    max_depth += 1
    queryset = self.clone()
    return queryset._dereference(queryset, max_depth=max_depth)
