def get_player_name(number, players, team, home_team):
    """
    This function is used for the description field in the html. Given a last name and a number it return the player's
    full name and id.

    :param number: player's number
    :param players: all players with info
    :param team: team of player
    :param home_team: home team

    :return: dict with full and and id
    """
    venue = "Home" if team == home_team else "Away"

    # Get the info when we get the same number for that team
    player = [{'name': name, 'id': players[venue][name]['id'], 'last_name': players[venue][name]['last_name']}
              for name in players[venue].keys() if players[venue][name]['number'] == number]

    # Control for when the name can't be found
    if not player:
        player = [{'name': None, 'id': None, 'last_name': None}]

    return player[0]