code: def preprocess_dataset(dataset, question_max_length, context_max_length):
      
      vocab_provider = VocabProvider(dataset)
      transformer = SQuADTransform(
          vocab_provider, question_max_length, context_max_length)
      processed_dataset = SimpleDataset(
          dataset.transform(transformer, lazy=False))
      return processed_dataset
docs: 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