def METHOD_NAME(dataset):
    # download and process dataset if it does not exist
    process_data(base_path, dataset)
    file_loc = os.path.join(base_path, dataset.filename)
    with open(file_loc, "rb") as f:
        dset = pickle.load(f)
        for k, v in dset.items():
            sequences = v["sequences"]
            dset[k]["sequences"] = pad_sequence(sequences, batch_first=True).type(
                torch.Tensor
            )
            dset[k]["sequence_lengths"] = v["sequence_lengths"].to(
                device=torch.Tensor().device
            )
    return dset