<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _extract_player_stats(self, table, player_dict, home_or_away):
 """ Combine all player stats into a single object. Since each player generally has a couple of rows worth of stats (one for basic stats and another for advanced stats) on the boxscore page, both rows should be combined into a single string object to easily query all fields from a single object instead of determining which row to pull metrics from. Parameters table : PyQuery object A PyQuery object of a single boxscore table, such as the home team's advanced stats or the away team's basic stats. player_dict : dictionary A dictionary where each key is a string of the player's ID and each value is a dictionary where the values contain the player's name, HTML data, and a string constant indicating which team the player is a member of. home_or_away : string constant A string constant indicating whether the player plays for the home or away team. Returns ------- dictionary Returns a ``dictionary`` where each key is a string of the player's ID and each value is a dictionary where the values contain the player's name, HTML data, and a string constant indicating which team the player is a member of. """

        for row in table('tbody tr').items():
            player_id = self._find_player_id(row)
            # Occurs when a header row is identified instead of a player.
            if not player_id:
                continue
            name = self._find_player_name(row)
            try:
                player_dict[player_id]['data'] += str(row).strip()
            except KeyError:
                player_dict[player_id] = {
                    'name': name,
                    'data': str(row).strip(),
                    'team': home_or_away
                }
        return player_dict