code: def _batchify(data, batch_size):
      data = torch.tensor(data)
      # Divide the dataset into bsz parts.
      nbatch = data.size(0) // batch_size
      # Trim off any extra elements that wouldn't cleanly fit (remainders).
      data = data.narrow(0, 0, nbatch * batch_size)
      # Evenly divide the data across the bsz batches.
      data = data.view(batch_size, -1).t().contiguous()
      return data
  
file_path: fairscale/benchmarks/datasets/wikitext2_data.py
imports: from collections import namedtuple
  from distutils.version import LooseVersion
  import io
  import operator
  import tempfile
  import torch
  from torch.utils.data import DataLoader
  from torch.utils.data.distributed import DistributedSampler
  import torchtext
  from torchtext.data.utils import get_tokenizer
  from torchtext.utils import download_from_url, extract_archive
label_desc: Use image node_id 1 for calling a global function with example usage: _batchify(data, batch_size) and returns: data