def _json_plays(drive, data):
 plays = []
 seen_ids = set()
 seen_desc = set()
 for playid in map(str, sorted(map(int, data))):
  p = data[playid]
  desc = (p['desc'], p['time'], p['yrdln'], p['qtr'])
  if ((playid in seen_ids) or (desc in seen_desc)):
   continue
  seen_ids.add(playid)
  seen_desc.add(desc)
  plays.append(Play(drive, playid, data[playid]))
 return plays

def _json_plays ( drive , data ) : plays = [ ] seen_ids = set ( ) seen_desc = set ( ) for playid in map ( str , sorted ( map ( int , data ) ) ) : p = data [ playid ] desc = ( p [ 'desc' ] , p [ 'time' ] , p [ 'yrdln' ] , p [ 'qtr' ] ) if ( ( playid in seen_ids ) or ( desc in seen_desc ) ) : continue seen_ids . add ( playid ) seen_desc . add ( desc ) plays . append ( Play ( drive , playid , data [ playid ] ) ) return plays
takes a single json drive entry and converts it to a list of play objects .