code: def test_dataloader_context():
      X = np.random.uniform(size=(10, 20))
      dataset = gluon.data.ArrayDataset(X)
      default_dev_id = 0
      custom_dev_id = 1
  
      # use non-pinned memory
      loader1 = gluon.data.DataLoader(dataset, 8)
      for _, x in enumerate(loader1):
          assert x.context == context.cpu(default_dev_id)
  
      # use pinned memory with default device id
      loader2 = gluon.data.DataLoader(dataset, 8, pin_memory=True)
      for _, x in enumerate(loader2):
          assert x.context == context.cpu_pinned(default_dev_id)
  
      if mx.device.num_gpus() <= 1:
          print(
              "Bypassing custom_dev_id pinned mem test on system with < 2 gpus."
          )
      else:
          # use pinned memory with custom device id
          loader3 = gluon.data.DataLoader(
              dataset, 8, pin_memory=True, pin_device_id=custom_dev_id
          )
          for _, x in enumerate(loader3):
              assert x.context == context.cpu_pinned(custom_dev_id)
  
imports: import os
  import tarfile
  import tempfile
  import unittest
  import mxnet
  import numpy
  import random
  from mxnet import gluon
  import platform
  from mxnet.gluon.data import DataLoader
  import mxnet.ndarray
  from mxnet import context
  from mxnet.gluon.data.dataset import Dataset
  from mxnet.gluon.data.dataset import ArrayDataset
  import pytest
label_desc: Use image node_id 22 for calling a global function with example usage: test_dataloader_context() without return types