code: def check_data_iterator_concat_result(
      di, batch_size, normalize, ds1, ds2, stop_exhausted
  ):
      datalist = []
      count = 0
      for data in di:
          for i in range(batch_size):
              count += 1
              if normalize:
                  v1 = round(data[0][i].flatten()[0] * 256)
              else:
                  v1 = round(data[0][i].flatten()[0])
              v2 = round(data[1][i][0])
              assert v1 == v2
              datalist.append(v1)
          if not stop_exhausted and di.epoch > 0:
              print("epoch=", di.epoch)
              break
  
      if not stop_exhausted:
          s = sorted(list(range(ds1)) + list(range(ds2)))
          assert len(set(datalist) - set(s)) == 0
          for i in s:
              assert i in datalist
              datalist.remove(i)
      else:
          assert (
              count == di._data_source.size // batch_size * batch_size
          )
  
imports: from __future__ import absolute_import
  import os
  import pytest
  import threading
  import numpy
  from nnabla.logger import logger
  from nnabla.config import nnabla_config
  from nnabla.utils.data_source_loader import load_image
  from nnabla.utils.data_iterator import data_iterator_csv_dataset
  from nnabla.utils.data_iterator import data_iterator_simple
  from nnabla.utils.data_iterator import data_iterator_concat_datasets
  from nnabla.utils.data_source_implements import CsvDataSource
  from .conftest import test_data_csv_png_10, test_data_csv_png_20
label_desc: Use image node_id 1 for calling a global function with example usage: check_data_iterator_concat_result(di, batch_size, normalize, ds1, ds2, stop_exhausted) without return types