code: def test_pickle_la_mode_with_palette(tmp_path):
      # Arrange
      filename = str(tmp_path / "temp.pkl")
      with Image.open("Tests/images/hopper.jpg") as im:
          im = im.convert("PA")
  
      # Act / Assert
      for protocol in range(0, pickle.HIGHEST_PROTOCOL + 1):
          im._mode = "LA"
          with open(filename, "wb") as f:
              pickle.dump(im, f, protocol)
          with open(filename, "rb") as f:
              loaded_im = pickle.load(f)
  
          im._mode = "PA"
          assert im == loaded_im
  
file_path: pillow/Tests/test_pickle.py
imports: from __future__ import annotations
  import pickle
  import pytest
  from PIL import Image, ImageDraw, ImageFont
  from .helper import assert_image_equal, skip_unless_feature
label_desc: Use image node_id 4 for calling a global function with example usage: test_pickle_la_mode_with_palette(tmp_path) without return types