parameters: (match_id)
docstring: Get the details of the given match_id, check if it's valid, and
      if it is, add it as a record in the database and spawn a thread to
      download and parse the corresponding replay.
docstring_summary: Get the details of the given match_id, check if it's valid, and
      if it is, add it as a record in the database and spawn a thread to
      download and parse the corresponding replay.
docstring_tokens: Get the details of the given match_id check if it s valid and if it is add it as a record in the database and spawn a thread to download and parse the corresponding replay .
function: def process_match_details(match_id):
      '''Get the details of the given match_id, check if it's valid, and
      if it is, add it as a record in the database and spawn a thread to
      download and parse the corresponding replay.'''
      global last_match_id
      gmd = api.get_match_details(match_id)['result']
  
      if not is_valid_match(gmd):
          logger.debug('Not considering match %s.' % match_id)
          return
  
      game_mode = get_game_mode_string(gmd['game_mode'])
  
      #print 'Match ID: %s - Game Mode: %s' % (match_id, game_mode)
  
      match_collection.insert(gmd)
      logger.debug('Processed match_id=%s' % match_id)
  
      last_match_id = match_id
function_tokens: def process_match_details ( match_id ) : global last_match_id gmd = api . get_match_details ( match_id ) [ 'result' ] if not is_valid_match ( gmd ) : logger . debug ( 'Not considering match %s.' % match_id ) return game_mode = get_game_mode_string ( gmd [ 'game_mode' ] ) #print 'Match ID: %s - Game Mode: %s' % (match_id, game_mode) match_collection . insert ( gmd ) logger . debug ( 'Processed match_id=%s' % match_id ) last_match_id = match_id