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

def select_related(self, max_depth=1):

    DeReference = _import_class('DeReference')
    DeReference()([self], (max_depth + 1))
    return self
