code: def test_idx_iter(self):
      train_set = Dataset.from_uir(self.triplet_data)
  
      ids = [
          batch_ids
          for batch_ids in train_set.idx_iter(
              idx_range=10, batch_size=1, shuffle=False
          )
      ]
      npt.assert_array_equal(ids, np.arange(10).reshape(10, 1))
  
      ids = [
          batch_ids
          for batch_ids in train_set.idx_iter(
              idx_range=10, batch_size=1, shuffle=True
          )
      ]
      npt.assert_raises(
          AssertionError,
          npt.assert_array_equal,
          ids,
          np.arange(10).reshape(10, 1),
      )
  
imports: import unittest
  import numpy
  import numpy.testing
  from cornac.data import BasketDataset, Dataset, SequentialDataset, Reader
label_desc: Use image node_id 5 for calling the TestDataset obj's underlying member method code with example usage: obj.test_idx_iter() without return types