def getPlayerData(db, player_ids=[]):
    """Takes a list of player ids and returns their metadata from the database."""
    data = db.players.find(
        {"$or": [{"player_id": player_id} for player_id in player_ids]}
    )
    return {player["player_id"]: player for player in data}