code: def get_data_batch(g_list, img_list, ctx_list):
      if g_list is None or len(g_list) == 0:
          return None, None
      n_gpu = len(ctx_list)
      size = len(g_list)
      if size < n_gpu:
          raise Exception("too small batch")
      step = size // n_gpu
      G_list = [
          g_list[i * step : (i + 1) * step]
          if i < n_gpu - 1
          else g_list[i * step : size]
          for i in range(n_gpu)
      ]
      img_list = [
          img_list[i * step : (i + 1) * step]
          if i < n_gpu - 1
          else img_list[i * step : size]
          for i in range(n_gpu)
      ]
  
      for G_slice, ctx in zip(G_list, ctx_list):
          for G in G_slice:
              G.ndata["bbox"] = G.ndata["bbox"].as_in_context(ctx)
              G.ndata["node_class"] = G.ndata[
                  "node_class"
              ].as_in_context(ctx)
              G.ndata["node_class_vec"] = G.ndata[
                  "node_class_vec"
              ].as_in_context(ctx)
              G.edata["rel_class"] = G.edata["rel_class"].as_in_context(
                  ctx
              )
      img_list = [img.as_in_context(ctx) for img in img_list]
      return G_list, img_list
  
file_path: dgl/examples/mxnet/scenegraph/validate_reldn.py
imports: import argparse
  import logging
  import time
  import mxnet
  import numpy
  from data import *
  from gluoncv.data.batchify import Pad
  from model import faster_rcnn_resnet101_v1d_custom, RelDN
  from mxnet import gluon, nd
  from utils import *
  import dgl
label_desc: Use image node_id 2 for calling a global function with example usage: get_data_batch(g_list, img_list, ctx_list) and returns: G_list,  img_list, None,  None