code: def test_ChunkIterFactory_utt2category():
      dataset = Dataset3(with_category=True)
      collatefn = CommonCollateFn()
      batches = [["a"], ["b"], ["c"], ["d"], ["e"], ["f"]]
      iter_factory = ChunkIterFactory(
          dataset=dataset,
          batches=batches,
          batch_size=2,
          chunk_length=3,
          num_cache_chunks=4,
          collate_fn=collatefn,
      )
  
      for key, batch in iter_factory.build_iter(0):
          for k, v in batch.items():
              if k == "data":
                  assert v.shape == (2, 3)
              elif k == "utt2category":
                  val = v[0].item()
                  assert all([vv.item() == val for vv in v])
  
file_path: espnet/test/espnet2/iterators/test_chunk_iter_factory.py
imports: import re
  import numpy
  import pytest
  from espnet2.iterators.chunk_iter_factory import ChunkIterFactory
  from espnet2.train.collate_fn import CommonCollateFn
label_desc: Use image node_id 3 for calling a global function with example usage: test_ChunkIterFactory_utt2category() without return types