code: def test_dataset_take_handle():
      length = 100
      a = mx.gluon.data.SimpleDataset(np.arange(length))
      a_take_full = a.take(1000).__mx_handle__()
      assert len(a_take_full) == length
      a_take_full = a.take(None).__mx_handle__()
      assert len(a_take_full) == length
      count = 10
      a_take_10 = a.take(count).__mx_handle__()
      assert len(a_take_10) == count
      expected_total = sum([i for i in range(count)])
      total = 0
      for sample in a_take_10:
          assert sample < count
          total += sample
      assert total == expected_total
  
      a_xform_take_10 = a.take(count).__mx_handle__()
      assert len(a_xform_take_10) == count
      expected_total = sum([i for i in range(count)])
      total = 0
      for sample in a_xform_take_10:
          assert sample < count
          total += sample
      assert total == expected_total
  
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 29 for calling a global function with example usage: test_dataset_take_handle() without return types