def _extract_tables(element):
    """Extract all tables from a BeautifulSoup element."""
    tables = element.find_all("table")
    if tables:
        return tables
    else:
        raise RuntimeError("Could not find tables.")