def parse_game_type(data: dict) -> str:
    """Parse and format a game's type."""
    is_rated = data.get('rated')
    speed = data.get('speed')
    variant = data.get('variant')

    game_type = 'unknown'

    if speed:
        game_type = '%s (%s)' % (speed, variant or 'standard')

    if is_rated:
        game_type = 'rated %s' % game_type
    else:
        game_type = 'unrated %s' % game_type

    return game_type