class_docstr: Internal multi-worker iterator for DataLoader.
docstr: Retrieve the next dataset. Returns None if no dataset is available.
docstr_tok: ["Retrieve","the","next","dataset",".","Returns","None","if","no","dataset","is","available","."]
code: def _next_dataset(self):
      """Retrieve the next dataset. Returns None if no dataset is available."""
      if self._rcvd_idx == self._sent_idx:
          assert (
              not self._data_buffer
          ), "Data buffer should be empty at this moment"
          return None
  
      assert (
          self._rcvd_idx < self._sent_idx
      ), "rcvd_idx must be smaller than sent_idx"
      assert (
          self._rcvd_idx in self._data_buffer
      ), "fatal error with _next_dataset, rcvd_idx missing"
  
      if (
          len(self._cached_dataset) == 0
          or self._data_buffer[self._rcvd_idx].ready()
      ):
          ret = self._data_buffer.pop(self._rcvd_idx)
          dataset, batch_sampler = ret.get()
          self._rcvd_idx += 1
          if (
              self._cached
              and len(self._cached_dataset) < self._num_max_cached
          ):
              self._cached_dataset.append((dataset, batch_sampler))
      else:
          dataset, batch_sampler = self._cached_dataset.pop(0)
  
      return dataset, batch_sampler
  
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 3 for calling the _MultiDatasetWorkerIter obj's underlying member method code with example usage: obj._next_dataset() and returns: dataset,  batch_sampler, None