code: def check_element_extract(
      shape, layout, element_map, dev, dtype=np.uint8
  ):
      pipe = element_extract_pipe(
          shape, layout, element_map, dev, dtype
      )
      pipe.build()
      for i in range(10):
          results = pipe.run()
          input = results[0]
          elements = results[1:]
          for i in range(batch_size):
              for j, idx in enumerate(element_map):
                  assert elements[j][i].layout() == layout[1:]
                  expected = to_array(input[i])[idx]
                  obtained = to_array(elements[j][i])
                  np.testing.assert_array_equal(expected, obtained)
  
file_path: DALI/dali/test/python/operator_1/test_element_extract.py
imports: from nvidia.dali.pipeline import Pipeline
  from nvidia.dali import fn, pipeline_def
  import nvidia.dali.ops
  from test_utils import RandomlyShapedDataIterator, to_array
  from nose_utils import assert_raises
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: check_element_extract(shape, layout, element_map, dev, dtype) without return types