class_docstr: Similar to :class:`MultiProcessMapDataZMQ`, except that this DataFlow
  also does batching in parallel in the worker processes.
  Therefore it can be helpful if you wish to hide the latency of batching.
  
  When `nr_proc==1`, the behavior of this class is identical to
  `BatchData(MapData(ds, map_func), batch_size)`.
  
  When `nr_proc>1`, the datapoints may be grouped in arbitrary order,
  or grouped with datapoints from a different pass of the given dataflow.
code: def reset_state(self):
      _MultiProcessZMQDataFlow.reset_state(self)
      self._guard = DataFlowReentrantGuard()
  
      job_pipe = _get_pipe_name("dataflow_MaB_job")
      result_pipe = _get_pipe_name("dataflow_MaB_result")
  
      self.context = zmq.Context()
      self.socket = self.context.socket(zmq.PULL)
      self.socket.set_hwm(max(5, self.buffer_size // self.batch_size))
      _bind_guard(self.socket, result_pipe)
  
      dispatcher = MultiProcessMapAndBatchDataZMQ._Dispatcher(
          self.ds, job_pipe, self.buffer_size
      )
  
      self._proc_ids = [
          "{}".format(k).encode("utf-8") for k in range(self.num_proc)
      ]
      worker_hwm = max(
          3, self.buffer_size // self.num_proc // self.batch_size
      )
      self._procs = [
          MultiProcessMapAndBatchDataZMQ._Worker(
              self._proc_ids[k],
              self.map_func,
              job_pipe,
              result_pipe,
              worker_hwm,
              self.batch_size,
          )
          for k in range(self.num_proc)
      ]
  
      self._procs.append(dispatcher)
      self._start_processes()
  
imports: import copy
  import ctypes
  import multiprocessing
  import numpy
  import threading
  import zmq
  from six.moves import queue
  from ..utils.concurrency import StoppableThread, enable_death_signal
  from ..utils.serialize import dumps_once, loads_once
  from .base import DataFlow, DataFlowReentrantGuard, ProxyDataFlow
  from .common import RepeatedData, BatchData
  from .parallel import _bind_guard, _get_pipe_name, _MultiProcessZMQDataFlow, _repeat_iter, _zmq_catch_error
label_desc: Use image node_id 2 for calling the MultiProcessMapAndBatchDataZMQ obj's underlying member method code with example usage: obj.reset_state() without return types