code: def test_constant():
      # Arrange
      im = Image.new("RGB", (20, 10))
  
      # Act
      new = ImageChops.constant(im, GRAY)
  
      # Assert
      assert new.size == im.size
      assert new.getpixel((0, 0)) == GRAY
      assert new.getpixel((19, 9)) == GRAY
  
imports: from __future__ import annotations
  from PIL import Image, ImageChops
  from .helper import assert_image_equal, hopper
label_desc: Use image node_id 8 for calling a global function with example usage: test_constant() without return types