code: def _testimpl_image_decoder_peek_shape(
      name,
      expected_shape,
      image_type=types.ANY_DATA,
      adjust_orientation=True,
  ):
      file = os.path.join(test_data_root, good_path, name)
  
      @pipeline_def(batch_size=1, device_id=0, num_threads=1)
      def peek_shape_pipeline(file):
          encoded, _ = fn.readers.file(files=[file])
          return fn.experimental.peek_image_shape(
              encoded,
              image_type=image_type,
              adjust_orientation=adjust_orientation,
          )
  
      pipe = peek_shape_pipeline(file)
      pipe.build()
      shape = tuple(np.asarray(pipe.run()[0][0]))
      assert (
          shape == expected_shape
      ), f"Expected shape {expected_shape} but got {shape}"
  
imports: import glob
  import math
  import numpy
  import nvidia.dali.backend
  import nvidia.dali.fn
  import nvidia.dali.types
  import os
  import random
  from nvidia.dali import pipeline_def
  from nose_utils import assert_raises
  from test_utils import compare_pipelines
  from test_utils import get_dali_extra_path
  from test_utils import to_array
  from test_utils import get_arch
  from nose2.tools import params
  from nose import SkipTest
label_desc: Use image node_id 24 for calling a global function with example usage: _testimpl_image_decoder_peek_shape(name, expected_shape, image_type, adjust_orientation) and returns: fn