def identify_table(soup, htmldict, numtable):
    """
    Checks whether the given BeautifulSoup tag is the table
    the user intends to process.
    """
    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, str):
        return 'id' in soup.attrs and soup['id'] == table_id
    elif isinstance(table_id, int):
        return table_id == numtable
    return False
