code: def _build_and_compare_pipelines_epochs(
      epochs_num, batch_size, parallel_pipeline, serial_pipeline
  ):
      parallel_pipeline.build()
      serial_pipeline.build()
      assert parallel_pipeline._py_pool is not None
      assert serial_pipeline._py_pool is None
      for _ in range(epochs_num):
          try:
              while True:
                  _run_and_compare_outputs(
                      batch_size, parallel_pipeline, serial_pipeline
                  )
          except StopIteration:
              parallel_pipeline.reset()
              serial_pipeline.reset()
  
imports: import copyreg
  import numpy
  import nvidia.dali.fn
  import nvidia.dali.pickling
  import os
  from nvidia.dali import pipeline_def
  from pickle import PicklingError
  from nose_utils import raises
  from test_utils import get_dali_extra_path, restrict_python_version
label_desc: Use image node_id 21 for calling a global function with example usage: _build_and_compare_pipelines_epochs(epochs_num, batch_size, parallel_pipeline, serial_pipeline) without return types