code: def test_trns_p_transparency(mode):
      # Arrange
      im = hopper("P")
      im.info["transparency"] = 128
  
      # Act
      converted_im = im.convert(mode)
  
      # Assert
      assert "transparency" not in converted_im.info
      if mode == "PA":
          assert converted_im.palette is not None
      else:
          # https://github.com/python-pillow/Pillow/issues/2702
          assert converted_im.palette is None
  
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 12 for calling a global function with example usage: test_trns_p_transparency(mode) without return types