code: def batchify(data, bsz, device):
      # Work out how cleanly we can divide the dataset into bsz parts.
      nbatch = data.size(0) // bsz
      # Trim off any extra elements that wouldn't cleanly fit (remainders).
      data = data.narrow(0, 0, nbatch * bsz)
      # Evenly divide the data across the bsz batches.
      data = data.view(bsz, -1)  # batch_first is True
      data = data.to(device)
      return data
  
imports: import argparse
  from copy import copy
  import logging
  import lzma
  import math
  import os
  import random
  import time
  from types import GeneratorType
  import numpy
  import torch
  from stanza.models.common.char_model import build_charlm_vocab, CharacterLanguageModel, CharacterLanguageModelTrainer
  from stanza.models.common.vocab import CharVocab
  from stanza.models.common import utils
  from stanza.models import _training_logging
label_desc: Use image node_id 2 for calling a global function with example usage: batchify(data, bsz, device) and returns: data