code: def test_palette_save_L(tmp_path):
      # Generate an L mode image with a separate palette
  
      im = hopper("P")
      im_l = Image.frombytes("L", im.size, im.tobytes())
      palette = bytes(im.getpalette())
  
      out = str(tmp_path / "temp.gif")
      im_l.save(out, palette=palette)
  
      with Image.open(out) as reloaded:
          assert_image_equal(reloaded.convert("RGB"), im.convert("RGB"))
  
imports: from io import BytesIO
  import pytest
  from PIL import GifImagePlugin, Image, ImageDraw, ImagePalette, features
  from .helper import assert_image_equal, assert_image_equal_tofile, assert_image_similar, hopper, is_pypy, netpbm_available
label_desc: Use image node_id 52 for calling a global function with example usage: test_palette_save_L(tmp_path) without return types