code: def test_palette_mmap():
      # Using mmap in ImageFile can require to reload the palette.
      with Image.open("Tests/images/multipage-mmap.tiff") as im:
          color1 = im.getpalette()[:3]
          im.seek(0)
          color2 = im.getpalette()[:3]
          assert color1 == color2
  
file_path: pillow/Tests/test_imagesequence.py
imports: from __future__ import annotations
  import pytest
  from PIL import Image, ImageSequence, TiffImagePlugin
  from .helper import assert_image_equal, hopper, skip_unless_feature
label_desc: Use image node_id 8 for calling a global function with example usage: test_palette_mmap() without return types