code: def test_basic_dataloader():
      def grouper(iterable, n, fillvalue=None):
          """Collect data into fixed-length chunks or blocks"""
          # grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx
          args = [iter(iterable)] * n
          return itertools.zip_longest(*args, fillvalue=fillvalue)
  
      ctx_l = [mx.cpu(i) for i in range(8)]
      dataset = [mx.np.ones((2,)) * i for i in range(1000)]
      dataloader = DataLoader(dataset, 2, num_workers=4, prefetch=10)
  
      for i, data_l in enumerate(grouper(dataloader, len(ctx_l))):
          for data, ctx in zip(data_l, ctx_l):
              if data is None:
                  continue
              data = data.as_in_ctx(ctx)
              mx.npx.waitall()
  
file_path: gluon-nlp/tests/test_gluon_block.py
imports: import pytest
  import mxnet
  from mxnet import nd, np, npx
  from mxnet.test_utils import assert_allclose
  from mxnet.gluon import HybridBlock, Constant
  from mxnet.gluon.data import DataLoader
  import itertools
label_desc: Use image node_id 5 for calling a global function with example usage: test_basic_dataloader() and returns: itertools