code: def test_batch_iter(self):
      X, y = load_data_and_labels(self.filename)
      batch_size = 32
      p = IndexTransformer()
      p.fit(X, y)
      gen = NERSequence(X, y, batch_size, preprocess=p.transform)
  
      y_gen = []
      for i in range(len(gen)):
          x1, y1 = gen[i]
          y_gen.extend(y1)
      self.assertEqual(len(y_gen), len(y))
  
file_path: anago/tests/test_utils.py
imports: import os
  import unittest
  from anago.utils import load_data_and_labels, Vocabulary, download, NERSequence
  from anago.preprocessing import IndexTransformer
label_desc: Use image node_id 3 for calling the TestUtils obj's underlying member method code with example usage: obj.test_batch_iter() without return types