code: def test_NDArrayIter_h5py():
      if not h5py:
          return
  
      data, labels = _init_NDArrayIter_data("ndarray")
  
      try:
          os.remove("ndarraytest.h5")
      except OSError:
          pass
      with h5py.File("ndarraytest.h5") as f:
          f.create_dataset("data", data=data)
          f.create_dataset("label", data=labels)
  
          _test_last_batch_handle(f["data"], f["label"])
          _test_last_batch_handle(f["data"], [])
          _test_last_batch_handle(f["data"])
      try:
          os.remove("ndarraytest.h5")
      except OSError:
          pass
  
imports: import mxnet
  import mxnet.ndarray
  from mxnet.test_utils import *
  from mxnet.base import MXNetError
  import numpy
  import os
  import gzip
  import pickle
  import time
  import sys
  from common import assertRaises
  import pytest
  from itertools import zip_longest
label_desc: Use image node_id 11 for calling a global function with example usage: test_NDArrayIter_h5py() without return types