code: def test_readonly():
      im = Image.new("RGB", (1, 1), (1, 2, 3))
      im.readonly = 1
  
      im.putalpha(4)
      assert not im.readonly
      assert im.mode == "RGBA"
      assert im.getpixel((0, 0)) == (1, 2, 3, 4)
  
imports: from __future__ import annotations
  from PIL import Image
label_desc: Use image node_id 3 for calling a global function with example usage: test_readonly() without return types