code: def test_p2pa_alpha():
      with Image.open("Tests/images/tiny.png") as im:
          assert im.mode == "P"
  
          im_pa = im.convert("PA")
      assert im_pa.mode == "PA"
  
      im_a = im_pa.getchannel("A")
      for x in range(4):
          alpha = 255 if x > 1 else 0
          for y in range(4):
              assert im_a.getpixel((x, y)) == alpha
  
imports: from __future__ import annotations
  import pytest
  from PIL import Image
  from .helper import assert_image, assert_image_equal, assert_image_similar, hopper
label_desc: Use image node_id 18 for calling a global function with example usage: test_p2pa_alpha() without return types