def METHOD_NAME(output_dir,dataset,split):
    """Preprocesses wikisql dataset downloaded from huggingface. Converts it to a format accepted by tapas
    Args:
        output_dir (str): Directory path to store converted intermediate data 
        dataset (Dataset): Downloaded wikisql dataset
        split (str): The dataset split whether train or dev
    Returns:
        str,str: Returns path to the output directory and path to the processed dataset
    """
    path = Path(output_dir)
    path.mkdir(parents=True, exist_ok=True)
    tables_path = Path(output_dir+"/tables/")
    tables_path.mkdir(parents=True, exist_ok=True)
    data_path = os.path.join(output_dir,split+".tsv")
    file_to_write = open(data_path,"wt")
    tsv_writer = csv.writer(file_to_write, delimiter='\t')
    tsv_writer.writerow(['id','question','table_file','answer_coordinates','answer_text','float_answer','aggregation_label'])
    for id, d in enumerate(dataset):
        question = d['question']
        qid = "wikisql_"+str(id)
        table = d['table']
        sql = d['sql']
        answer_text,table =  get_answer(table,sql)
        answer_text = [str(i) for i in answer_text]
        table_id,processed_table,min_tokens = preprocess_table(table)
        if answer_text==['']:
            continue
        if min_tokens > 150:
            continue
        table_df = pd.DataFrame.from_dict(processed_table)
        parsed_data = parse_question(table_df,question,answer_text)
        table_df.to_csv(os.path.join(output_dir,"tables/"+str(table_id)+".csv"), sep=',')
        answer_coordinates = parsed_data[2]
        if answer_coordinates=="" or answer_coordinates==None or answer_coordinates==[]:
            continue
        float_answer = parsed_data[3]
        aggregation_label = parsed_data[4]
        tsv_writer.writerow([qid,question,"tables/"+str(table_id)+".csv",answer_coordinates,answer_text,float_answer,aggregation_label])
    print("Preprocessing done")
    file_to_write.close()
    return output_dir,data_path