# The first tr contains the field names.
    datasets = []
    for row in table.find_all("tr"):
        dataset = list((td.get_text().strip(), 
                        td.attrs.get('colspan', 1),
                        td.attrs.get('rowspan', 1)) 
                       for td in row.find_all("td"))
        datasets.append(dataset)

def extract_table(html):
    soup = BeautifulSoup(html,'lxml')
    table = soup.find("table", attrs={"class":"basic_table"})
    
    if table is None:
        return table
    return table

    '''# The first tr contains the field names.
    datasets = []
    for row in table.find_all("tr"):
        dataset = list((td.get_text().strip(), 
                        td.attrs.get('colspan', 1),
                        td.attrs.get('rowspan', 1)) 
                       for td in row.find_all("td"))
        datasets.append(dataset)'''
    return datasets