code: def batcher(device):
      def batcher_dev(batch):
          batch_trees = dgl.batch(batch)
          return SSTBatch(
              graph=batch_trees,
              mask=batch_trees.ndata["mask"].to(device),
              wordid=batch_trees.ndata["x"].to(device),
              label=batch_trees.ndata["y"].to(device),
          )
  
      return batcher_dev
  
file_path: dgl/examples/pytorch/tree_lstm/train.py
imports: import argparse
  import collections
  import time
  import dgl
  import numpy
  import torch
  import torch.nn.functional
  import torch.nn.init
  import torch.optim
  from dgl.data.tree import SSTDataset
  from torch.utils.data import DataLoader
  from tree_lstm import TreeLSTM
label_desc: Use image node_id 1 for calling a global function with example usage: batcher(device) and returns: batcher_dev, SSTBatch