code: def check_layout(pipe, layout):
      pipe.build()
      capture_processes(pipe._py_pool)
      while True:
          try:
              (res,) = pipe.run()
              assert res.layout() == layout
          except StopIteration:
              break
  
imports: import numpy
  import nvidia.dali
  from nose.tools import with_setup
  from test_pool_utils import capture_processes, teardown_function, setup_function
  from test_utils import compare_pipelines, check_batch, RandomDataIterator, RandomlyShapedDataIterator
label_desc: Use image node_id 7 for calling a global function with example usage: check_layout(pipe, layout) without return types