def METHOD_NAME(debateresult):
    """ Make a human-readable representation of a debate result """
    def get_display_name(dt, t, use_codes):
        return {
            'team': dt.team.code_name if use_codes else dt.team.short_name,
            'side': dt.get_side_abbr(t),
        }
    def format_dt(dt, t, use_codes):
        # Translators: e.g. "{Melbourne 1} as {OG}", "{Cape Town 1} as {CO}"
        return _("%(team)s as %(side)s") % get_display_name(dt, t, use_codes)
    t = debateresult.tournament
    use_codes = use_team_code_names(t, True)
    try:
        if t.pref('teams_in_debate') == 'two':
            result_winner = _("%(team)s (%(side)s) won") % get_display_name(debateresult.winning_dt(), t, use_codes)
            # Translators: The team here is the losing team
            result = _("vs %(team)s (%(side)s)") % get_display_name(debateresult.losing_dt(), t, use_codes)
        elif not debateresult.is_voting and debateresult.is_elimination:
            result_winner = _("Advancing: %(advancing_list)s<br>") % {
                'advancing_list': ", ".join(format_dt(dt, t, use_codes) for dt in debateresult.advancing_dt()),
            }
            result = _("Eliminated: %(eliminated_list)s")
            result = result % {
                'eliminated_list': ", ".join(format_dt(dt, t, use_codes) for dt in debateresult.eliminated_dt()),
            }
        else:  # BP preliminary round
            ordered = debateresult.get_ranked_dt()
            result_winner = _("1st: %(first_team)s<br>") % {'first_team':  format_dt(ordered[0], t, use_codes)}
            result = _("2nd: %(second_team)s<br>\n"
                       "3rd: %(third_team)s<br>\n"
                       "4th: %(fourth_team)s")
            result = result % {
                'second_team': format_dt(ordered[1], t, use_codes),
                'third_team':  format_dt(ordered[2], t, use_codes),
                'fourth_team': format_dt(ordered[3], t, use_codes),
            }
    except (IndexError, AttributeError):
        logger.warning("Error constructing latest result string", exc_info=True)
        if use_codes:
            matchup = debateresult.debate.matchup_codes
        else:
            matchup = debateresult.debate.matchup
        result_winner = _("Error with result for %(debate)s") % {'debate': matchup}
        result = ""
    return result_winner, result