code: def test_element_extract_layout():
      for shape, layout in [
          ([4, 2, 2], "FHW"),
          ([6, 1], "FX"),
          ([8, 10, 10, 3], "FHWC"),
      ]:
          for element_map in [[1, 3], [0], [2, 2], [0, 1, 2]]:
              for device in ["cpu", "gpu"]:
                  for dtype in [np.uint8, np.int32]:
                      yield check_element_extract, shape, layout, element_map, device, dtype
      for device in ["cpu", "gpu"]:
          yield check_element_extract, [4, 3, 3], "FXY", [
              0,
              1,
              2,
              3,
              3,
              2,
              1,
              0,
          ], device
  
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 4 for calling a global function with example usage: test_element_extract_layout() without return types