def preprocess_dataset(dataset, question_max_length, context_max_length):
vocab_provider = VocabProvider(dataset)<EOL>transformer = SQuADTransform(<EOL>vocab_provider, question_max_length, context_max_length)<EOL>processed_dataset = SimpleDataset(<EOL>dataset.transform(transformer, lazy=False))<EOL>return processed_dataset<EOL>
Process SQuAD dataset by creating NDArray version of data

    :param Dataset dataset: SQuAD dataset
    :param int question_max_length: Maximum length of question (padded or trimmed to that size)
    :param int context_max_length: Maximum length of context (padded or trimmed to that size)

    Returns
    -------
    SimpleDataset
        Dataset of preprocessed records