def _avg_elo(*args):
    """Calculates the average (weighted) elo for one or more players."""
    elo = 0.0
    games = 0
    for p in args:
        _games = p.statistics.games_won + p.statistics.games_lost
        elo += p.statistics.elo * _games
        games += _games
    return elo / games