def _json_team_stats(data):
 return TeamStats(first_downs=int(data['totfd']), total_yds=int(data['totyds']), passing_yds=int(data['pyds']), rushing_yds=int(data['ryds']), penalty_cnt=int(data['pen']), penalty_yds=int(data['penyds']), turnovers=int(data['trnovr']), punt_cnt=int(data['pt']), punt_yds=int(data['ptyds']), punt_avg=int(data['ptavg']), pos_time=PossessionTime(data['top']))

def _json_team_stats ( data ) : return TeamStats ( first_downs = int ( data [ 'totfd' ] ) , total_yds = int ( data [ 'totyds' ] ) , passing_yds = int ( data [ 'pyds' ] ) , rushing_yds = int ( data [ 'ryds' ] ) , penalty_cnt = int ( data [ 'pen' ] ) , penalty_yds = int ( data [ 'penyds' ] ) , turnovers = int ( data [ 'trnovr' ] ) , punt_cnt = int ( data [ 'pt' ] ) , punt_yds = int ( data [ 'ptyds' ] ) , punt_avg = int ( data [ 'ptavg' ] ) , pos_time = PossessionTime ( data [ 'top' ] ) )
takes a team stats json entry and converts it to a teamstats namedtuple .