code: def prepare_data_loader(args, dataset, vocab, test=False):
      
      # Preprocess
      dataset = dataset.transform(lambda s1, s2, label: (vocab(s1), vocab(s2), label),
                                  lazy=False)
  
      # Batching
      batchify_fn = btf.Tuple(btf.Pad(), btf.Pad(), btf.Stack(dtype='int32'))
      data_lengths = [max(len(d[0]), len(d[1])) for d in dataset]
      batch_sampler = nlp.data.FixedBucketSampler(lengths=data_lengths,
                                                  batch_size=args.batch_size,
                                                  shuffle=(not test))
      data_loader = gluon.data.DataLoader(dataset=dataset,
                                          batch_sampler=batch_sampler,
                                          batchify_fn=batchify_fn)
      return data_loader
docs: Read data and build data loader.