code: def default_mp_batchify_fn(data):
      
      if isinstance(data[0], nd.NDArray):
          out = nd.empty((len(data),) + data[0].shape, dtype=data[0].dtype,
                         ctx=context.Context('cpu_shared', 0))
          return nd.stack(*data, out=out)
      elif isinstance(data[0], tuple):
          data = zip(*data)
          return [default_mp_batchify_fn(i) for i in data]
      else:
          data = np.asarray(data)
          return nd.array(data, dtype=data.dtype,
                          ctx=context.Context('cpu_shared', 0))
docs: Collate data into batch. Use shared memory for stacking.