code: def test_p_alpha(tmp_path):
      # Arrange
      outfile = str(tmp_path / "temp.pdf")
      with Image.open("Tests/images/pil123p.png") as im:
          assert im.mode == "P"
          assert isinstance(im.info["transparency"], bytes)
  
          # Act
          im.save(outfile)
  
      # Assert
      with open(outfile, "rb") as fp:
          contents = fp.read()
      assert b"\n/SMask " in contents
  
imports: from __future__ import annotations
  import io
  import os
  import os.path
  import tempfile
  import time
  import pytest
  from PIL import Image, PdfParser, features
  from .helper import hopper, mark_if_feature_version, skip_unless_feature
label_desc: Use image node_id 4 for calling a global function with example usage: test_p_alpha(tmp_path) without return types