class_docstr: MXNet batchify function implemented in C++.
  
  Parameters
  ----------
  handle : ctypes.c_void
      Object handle.
class_docstr_tok: ["MXNet","batchify","function","implemented","in","C++",".","Parameters","--","--","--","--","--","handle",":","ctypes.c_void","Object","handle","."]
code: def __call__(self, data, num_out=1):
      if isinstance(data[0], NDArray):
          create_ndarray_fn = (
              _np_ndarray_cls if is_np_array() else _ndarray_cls
          )
          num_output = ctypes.c_int(num_out)
          input_arrs = (NDArrayHandle * len(data))()
          for i, d in enumerate(data):
              input_arrs[i] = d.handle
          input_vars = ctypes.cast(
              input_arrs, ctypes.POINTER(NDArrayHandle)
          )
          batch_size = ctypes.c_int(len(data) // num_output.value)
          output_vars = ctypes.POINTER(NDArrayHandle)()
          check_call(
              _LIB.MXBatchifyFunctionInvoke(
                  self.handle,
                  batch_size,
                  num_output,
                  input_vars,
                  ctypes.byref(output_vars),
              )
          )
          out = [
              create_ndarray_fn(
                  ctypes.cast(output_vars[i], NDArrayHandle), False
              )
              for i in range(num_output.value)
          ]
          if len(out) == 1:
              out = out[0]
          return out
      elif isinstance(data[0], (list, tuple)):
          return self.__call__(
              [j for sub in data for j in sub], num_out=len(data[0])
          )
      else:
          data = [default_array(i) for i in data]
          return self.__call__(data, num_out=num_out)
  
imports: import sys
  import ctypes
  from .dataset import Dataset
  from .sampler import Sampler
  from ...base import _LIB
  from ...base import c_str_array, mx_uint, py_str
  from ...base import DatasetHandle, NDArrayHandle, BatchifyFunctionhandle
  from ...base import check_call, build_param_doc
  from ...ndarray import NDArray
  from ...ndarray import _ndarray_cls
  from ...numpy.multiarray import _np_ndarray_cls
  from ...util import is_np_array, default_array
  from ...io import io
label_desc: Use image node_id 5 for calling the MXBatchifyFunction obj's underlying member method code with example usage: obj.__call__(data, num_out) and returns: out, self, self