'Traverse the fields of the related field `self` except for the last
one, and return it as a pair `(last_record, last_field)`.'

def traverse_related(self, record):

    for name in self.related[:(-1)]:
        record = record[name][:1].with_prefetch(record._prefetch)
    return (record, self.related_field)
