code: def _worker_fn(samples, transform_fn, batchify_fn):
      """Function for processing data in worker process."""
      # it is required that each worker process has to fork a new MXIndexedRecordIO handle
      # preserving dataset as global variable can save tons of overhead and is safe in new process
      global _worker_dataset
      t_dataset = _worker_dataset.transform(transform_fn)
      batch = batchify_fn([t_dataset[i] for i in samples])
      buf = io.BytesIO()
      ForkingPickler(buf, pickle.HIGHEST_PROTOCOL).dump(batch)
      return buf.getvalue()
  
imports: import io
  import pickle
  import multiprocessing
  from multiprocessing.reduction import ForkingPickler
  import numpy
  from mxnet import nd
  from mxnet import context
  from mxnet.gluon.data.dataloader import DataLoader, _MultiWorkerIter
  from mxnet.gluon.data.dataloader import default_mp_batchify_fn, default_batchify_fn
label_desc: Use image node_id 5 for calling a global function with example usage: _worker_fn(samples, transform_fn, batchify_fn) and returns: buf