def identify_table(soup, htmldict, numtable):
 if ((soup is None) or (soup.name != 'table')):
  return False
 elif ('table_id' not in htmldict):
  return (numtable == 1)
 table_id = htmldict['table_id']
 if isinstance(table_id, six.string_types):
  return (('id' in soup.attrs) and (soup['id'] == table_id))
 elif isinstance(table_id, int):
  return (table_id == numtable)
 return False

def identify_table ( soup , htmldict , numtable ) : if ( ( soup is None ) or ( soup . name != 'table' ) ) : return False elif ( 'table_id' not in htmldict ) : return ( numtable == 1 ) table_id = htmldict [ 'table_id' ] if isinstance ( table_id , six . string_types ) : return ( ( 'id' in soup . attrs ) and ( soup [ 'id' ] == table_id ) ) elif isinstance ( table_id , int ) : return ( table_id == numtable ) return False
checks whether the given beautifulsoup tag is the table the user intends to process .