code: def test_tiff_palette():
      normal = os.path.join(
          test_data_root, good_path, "tiff", "0/cat-300572_640.tiff"
      )
      palette = os.path.join(
          test_data_root,
          good_path,
          "tiff",
          "0/cat-300572_640_palette.tiff",
      )
  
      @pipeline_def(batch_size=2, device_id=0, num_threads=1)
      def pipe():
          encoded, _ = fn.readers.file(files=[normal, palette])
          peeked_shapes = fn.peek_image_shape(encoded)
          decoded = fn.decoders.image(encoded, device="cpu")
          return decoded, peeked_shapes
  
      p = pipe()
      p.build()
      imgs, peeked_shapes = p.run()
      assert (
          peeked_shapes.at(0) == peeked_shapes.at(1)
      ).all(), "Invalid peeked shape of palette TIFF"
  
      delta = (
          np.abs(
              imgs.at(0).astype("float") - imgs.at(1).astype("float")
          )
          / 256
      )
      assert (
          np.quantile(delta, 0.9) < 0.05
      ), "Original and palette TIFF differ significantly"
  
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 nose2.tools import params
  from nose_utils import assert_raises
  from test_utils import check_output_pattern
  from test_utils import compare_pipelines
  from test_utils import get_dali_extra_path
  from test_utils import to_array
label_desc: Use image node_id 31 for calling a global function with example usage: test_tiff_palette() and returns: decoded,  peeked_shapes