code: def test_alpha_composite(self):
      # https://stackoverflow.com/questions/3374878
      # Arrange
      expected_colors = sorted(
          [
              (1122, (128, 127, 0, 255)),
              (1089, (0, 255, 0, 255)),
              (3300, (255, 0, 0, 255)),
              (1156, (170, 85, 0, 192)),
              (1122, (0, 255, 0, 128)),
              (1122, (255, 0, 0, 128)),
              (1089, (0, 255, 0, 0)),
          ]
      )
  
      dst = Image.new("RGBA", size=(100, 100), color=(0, 255, 0, 255))
      draw = ImageDraw.Draw(dst)
      draw.rectangle((0, 33, 100, 66), fill=(0, 255, 0, 128))
      draw.rectangle((0, 67, 100, 100), fill=(0, 255, 0, 0))
      src = Image.new("RGBA", size=(100, 100), color=(255, 0, 0, 255))
      draw = ImageDraw.Draw(src)
      draw.rectangle((33, 0, 66, 100), fill=(255, 0, 0, 128))
      draw.rectangle((67, 0, 100, 100), fill=(255, 0, 0, 0))
  
      # Act
      img = Image.alpha_composite(dst, src)
  
      # Assert
      img_colors = sorted(img.getcolors())
      assert img_colors == expected_colors
  
imports: import io
  import os
  import shutil
  import sys
  import tempfile
  import pytest
  from PIL import Image, ImageDraw, ImagePalette, UnidentifiedImageError
  from .helper import assert_image_equal, assert_image_equal_tofile, assert_image_similar_tofile, assert_not_all_same, hopper, is_win32, mark_if_feature_version, skip_unless_feature
label_desc: Use image node_id 25 for calling the TestImage obj's underlying member method code with example usage: obj.test_alpha_composite() without return types