def _parse_contract(self, player_info):
tables = player_info('<STR_LIT>').items()<EOL>for table in tables:<EOL><INDENT>id_attr = table.attr('<STR_LIT:id>')<EOL>if id_attr:<EOL><INDENT>if id_attr.startswith('<STR_LIT>'):<EOL><INDENT>years = self._parse_contract_headers(table)<EOL>wages = self._parse_contract_wages(table)<EOL>contract = self._combine_contract(years, wages)<EOL>if contract == {}:<EOL><INDENT>contract = None<EOL><DEDENT>setattr(self, '<STR_LIT>', contract)<EOL>break<EOL><DEDENT><DEDENT><DEDENT>
Parse the player's contract.

Depending on the player's contract status, a contract table is located
at the bottom of the stats page and includes player wages by season. If
found, create a dictionary housing the wages by season.

Parameters
----------
player_info : PyQuery object
    A PyQuery object containing the HTML from the player's stats page.