code: def test_peek_shape():
      tests = [
          ("bmp/0/cat-1245673_640.bmp", (423, 640, 3)),
          ("bmp/0/cat-111793_640_grayscale.bmp", (426, 640, 1)),
          ("jpeg/641/maracas-706753_1280.jpg", (1280, 919, 3)),
          ("jpeg2k/0/cat-3449999_640.jp2", (426, 640, 3)),
          ("tiff/0/cat-300572_640.tiff", (536, 640, 3)),
          ("png/0/cat-3591348_640.png", (427, 640, 3)),
          ("pnm/0/cat-3591348_640.pbm", (427, 640, 1)),
          ("tiff/0/kitty-2948404_640.tiff", (433, 640, 3)),
          ("tiff/0/cat-111793_640_gray.tiff", (475, 640, 1)),
          ("webp/lossless/cat-111793_640.webp", (426, 640, 3)),
          (
              "jpeg_lossless/0/cat-1245673_640_grayscale_16bit.jpg",
              (423, 640, 1),
          ),
          (
              "multichannel/with_alpha/cat-111793_640-alpha.jp2",
              (426, 640, 4),
          ),
          (
              "multichannel/with_alpha/cat-111793_640-alpha.png",
              (426, 640, 4),
          ),
          (
              "multichannel/tiff_multichannel/cat-111793_640_multichannel.tif",
              (475, 640, 6),
          ),
      ]
  
      for name, expected_shape in tests:
          yield _testimpl_image_decoder_peek_shape, name, expected_shape
  
      yield _testimpl_image_decoder_peek_shape, "tiff/0/kitty-2948404_640.tiff", (
          433,
          640,
          1,
      ), types.GRAY, True
      yield _testimpl_image_decoder_peek_shape, "bmp/0/cat-111793_640_grayscale.bmp", (
          426,
          640,
          3,
      ), types.RGB, True
  
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 25 for calling a global function with example usage: test_peek_shape() without return types