code: def _test_alpha_premult(self, op):
      # create image with half white, half black,
      # with the black half transparent.
      # do op,
      # there should be no darkness in the white section.
      im = Image.new("RGBA", (10, 10), (0, 0, 0, 0))
      im2 = Image.new("RGBA", (5, 10), (255, 255, 255, 255))
      im.paste(im2, (0, 0))
  
      im = op(im, (40, 10))
      im_background = Image.new("RGB", (40, 10), (255, 255, 255))
      im_background.paste(im, (0, 0), im)
  
      hist = im_background.histogram()
      assert 40 * 10 == hist[-1]
  
imports: from __future__ import annotations
  import math
  import pytest
  from PIL import Image, ImageTransform
  from .helper import assert_image_equal, assert_image_similar, hopper
label_desc: Use image node_id 8 for calling the TestImageTransform obj's underlying member method code with example usage: obj._test_alpha_premult(op) without return types