def METHOD_NAME(out_dir,tokenizer,subset_train=-1,subset_dev=-1):
    """Main function which downloads the wikisql data from huggingface, converts it into required format and preprocessed it and returns the Dataset objects.
    Args:
        out_dir (str): Output directory to store intemediate converted data
        tokenizer (TapasTokenizer): Tokenizer to tokenize the data and get encodings
    Returns:
        Dataset,Dataset: Returns processed train and dev Dataset objects
    """
    print("Preprocessing wikisql dataset")
    dataset_dev = load_dataset('wikisql', split=nlp.Split.VALIDATION)
    dataset_train = load_dataset('wikisql', split=nlp.Split.TRAIN)
    if(subset_dev>-1):
        dataset_dev=dataset_dev.select(range(subset_dev))
    if(subset_train>-1):
        dataset_train=dataset_train.select(range(subset_train))
    root_dir,train_data_path = preprocess_wikisql(out_dir,dataset_train,"train")
    root_dir,dev_data_path  = preprocess_wikisql(out_dir,dataset_dev,"dev")
    dev_data = pd.read_csv(dev_data_path, sep='\t')
    dev_dataset = DatasetProcessor(dev_data, tokenizer,root_dir)
    train_data = pd.read_csv(train_data_path, sep='\t')
    train_dataset = DatasetProcessor(train_data, tokenizer,root_dir)
    return train_dataset,dev_dataset