code: def test_mx_datasets_handle():
      # _DownloadedDataset
      mnist = mx.gluon.data.vision.MNIST(train=False).__mx_handle__()
      assert len(mnist) == 10000
      cifar10 = mx.gluon.data.vision.CIFAR10(
          train=False
      ).__mx_handle__()
      assert len(cifar10) == 10000
  
      # _SampledDataset
      s_mnist = mnist.take(100).__mx_handle__()
      assert len(s_mnist) == 100
      assert np.all(s_mnist[0][0].asnumpy() == mnist[0][0].asnumpy())
      assert s_mnist[0][1] == mnist[0][1]
  
      # ArrayDataset
      mc = mx.gluon.data.ArrayDataset(
          mnist.take(100), cifar10.take(100)
      ).__mx_handle__()
      assert len(mc) == 100
      assert len(mc[0]) == 4  # two from mnist, two from cifar10
      assert mc[0][1] == mnist[0][1]
      assert mc[0][3] == cifar10[0][1]
  
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 31 for calling a global function with example usage: test_mx_datasets_handle() without return types