class_docstr: Internal multi-worker iterator for DataLoader.
docstr: Assign next batch workload to workers.
docstr_tok: ["Assign","next","batch","workload","to","workers","."]
code: def _push_next(self):
      """Assign next batch workload to workers."""
      if self._batch_iter is not None:
          r = next(self._batch_iter, None)
      else:
          r = None
      if r is None:
          result = self._next_dataset()
          if result is None:
              return
          else:
              dataset, batch_sampler = result
              # Without checking the reference counts of previous datasets in the master process,
              # the key error can be triggered occasionally. This may be a bug in Python.
              self._count_dataset_ref(dataset)
              self._dataset = dataset
              # initialize reference counter
              if id(dataset) not in self._counter_ref:
                  self._counter_ref[id(dataset)] = self._manager.Value(
                      "i", 0
                  )
              self._batch_iter = iter(batch_sampler)
              self._push_next()
      else:
          counter = self._counter_ref[id(self._dataset)]
          counter.value += 1
          async_ret = self._worker_pool.apply_async(
              self._worker_fn,
              (r, self._batchify_fn, self._dataset, counter),
          )
          self._data_buffer[self._sent_idx] = async_ret
          self._sent_idx += 1
  
imports: import io
  import os
  import gc
  import glob
  import pickle
  import warnings
  import multiprocessing
  from functools import partial
  import numpy
  from mxnet import context, npx
  from mxnet.gluon.data import ArrayDataset, SimpleDataset
  from mxnet.gluon.data.dataloader import ForkingPickler, _as_in_context, default_mp_batchify_fn, default_batchify_fn
label_desc: Use image node_id 4 for calling the _MultiBatchWorkerIter obj's underlying member method code with example usage: obj._push_next() without return types