code: def test_nonzero_coefficients(self):
      # regression test for the wrong coefficients calculation
      # due to bug https://github.com/python-pillow/Pillow/issues/2161
      im = Image.new("RGBA", (1280, 1280), (0x20, 0x40, 0x60, 0xFF))
      histogram = im.resize((256, 256), Image.BICUBIC).histogram()
  
      # first channel
      assert histogram[0x100 * 0 + 0x20] == 0x10000
      # second channel
      assert histogram[0x100 * 1 + 0x40] == 0x10000
      # third channel
      assert histogram[0x100 * 2 + 0x60] == 0x10000
      # fourth channel
      assert histogram[0x100 * 3 + 0xFF] == 0x10000
  
imports: from contextlib import contextmanager
  import pytest
  from PIL import Image, ImageDraw
  from .helper import assert_image_equal, assert_image_similar, hopper, mark_if_feature_version
label_desc: Use image node_id 2 for calling the TestCoreResampleCoefficients obj's underlying member method code with example usage: obj.test_nonzero_coefficients() without return types