'Returns a new QuerySet instance that will select related objects.
If fields are specified, they must be ForeignKey fields and only those
related objects are included in the selection.'

def select_related(self, *fields, **kwargs):

    depth = kwargs.pop('depth', 0)
    if kwargs:
        raise TypeError(('Unexpected    keyword    arguments    to    select_related:    %s' % (kwargs.keys(),)))
    obj = self._clone()
    if fields:
        if depth:
            raise TypeError('Cannot    pass    both    "depth"    and    fields    to    select_related()')
        obj.query.add_select_related(fields)
    else:
        obj.query.select_related = True
    if depth:
        obj.query.max_depth = depth
    return obj
