code: def get_data_loader(dataset, batch_size, num_workers, input_size):
      def val_batch_fn(batch, ctx):
          data = gluon.utils.split_and_load(
              batch[0], ctx_list=ctx, batch_axis=0, even_split=False
          )
          return tuple([data] + batch[1:])
  
      val_dataset = get_dataset(dataset)
  
      transform_val = AlphaPoseDefaultValTransform(
          num_joints=val_dataset.num_joints,
          joint_pairs=val_dataset.joint_pairs,
          image_size=input_size,
      )
      val_data = gluon.data.DataLoader(
          val_dataset.transform(transform_val),
          batch_size=batch_size,
          shuffle=False,
          last_batch="keep",
          num_workers=num_workers,
      )
  
      return val_dataset, val_data, val_batch_fn
  
file_path: gluon-cv/scripts/pose/alpha_pose/validate.py
imports: import argparse, time, logging, os, math
  import numpy
  import mxnet
  from mxnet import gluon, nd
  from mxnet import autograd
  from mxnet.gluon import nn
  from mxnet.gluon.data.vision import transforms
  import gluoncv
  from gluoncv.data import mscoco
  from gluoncv.model_zoo import get_model
  from gluoncv.utils import makedirs
  from gluoncv.data.transforms.pose import transform_preds, get_final_preds, flip_heatmap, heatmap_to_coord_alpha_pose
  from gluoncv.data.transforms.presets.alpha_pose import AlphaPoseDefaultValTransform
  from gluoncv.utils.metrics.coco_keypoints import COCOKeyPointsMetric
label_desc: Use image node_id 2 for calling a global function with example usage: get_data_loader(dataset, batch_size, num_workers, input_size) and returns: val_dataset,  val_data,  val_batch_fn, tuple