code: def default_batchify_fn(data):
      
      if isinstance(data[0], nd.NDArray):
          return nd.stack(*data)
      elif isinstance(data[0], tuple):
          data = zip(*data)
          return [default_batchify_fn(i) for i in data]
      else:
          data = np.asarray(data)
          return nd.array(data, dtype=data.dtype)
docs: Collate data into batch.