def get_latest_results(self):
        results = {}
        for result in self.result_set.filter(ladder=self).order_by('-date_added')[:10]:  # [:10] to limit to 5

            try:
                opponent = self.result_set.filter(ladder=self, player=result.opponent, opponent=result.player)[0]
            except IndexError:
                continue  # this exception happens if result does not have opponent
            player_opponent_index = ''.join(unicode(e) for e in sorted([result.player.id, opponent.player.id]))
            try:
                if results[player_opponent_index]:
                    continue
            except KeyError:
                results[player_opponent_index] = {'player': result.player, 'player_result': result.result,
                                                  'opponent_result': opponent.result, 'opponent': opponent.player,
                                                  'date_added': result.date_added}

        ordered_results = {}
        i = 0
        for key in sorted(results, key=lambda x: (results[x]['date_added']), reverse=True):
            ordered_results[i] = results[key]
            i += 1

        return list(ordered_results.items())
Return the identifier for this request used by GAE's logservice.
dataset/ETHPy150Open jzahedieh/django-tennis-ladder/ladder/models.py/Ladder.get_latest_results--crossover with--dataset/ETHPy150Open gae-init/gae-init-debug/main/libx/gae_mini_profiler/profiler.py/RequestProfiler.get_logging_request_id