code: def test_api_fw_check2(iter_type, data_definition):
      root, annotations = data_paths()
  
      pipe = DetectionPipeline(BATCH_SIZE, 0, root, annotations)
      pipe.build()
      pipe.schedule_run()
      pipe.share_outputs()
      pipe.release_outputs()
      pipe.schedule_run()
      pipe.outputs()
      with assert_raises(
          RuntimeError,
          glob=(
              "Mixing pipeline API type. Currently used: PipelineAPIType.SCHEDULED,"
              " but trying to use PipelineAPIType.ITERATOR"
          ),
      ):
          train_loader = iter_type(
              [pipe],
              data_definition,
              EPOCH_SIZE,
              auto_reset=False,
              dynamic_shape=True,
          )
          train_loader.__next__()
      # disable check
      pipe.enable_api_check(False)
      try:
          train_loader = iter_type(
              [pipe],
              data_definition,
              EPOCH_SIZE,
              auto_reset=False,
              dynamic_shape=True,
          )
          train_loader.__next__()
          assert True
      except RuntimeError:
          assert False
      yield check, iter_type
  
imports: import nvidia.dali.ops
  import os
  from nvidia.dali.pipeline import Pipeline
  from test_utils import get_dali_extra_path
  from nose_utils import assert_raises
label_desc: Use image node_id 12 for calling a global function with example usage: test_api_fw_check2(iter_type, data_definition) without return types