code: def test_colorize_2color_offset():
      # Test the colorizing function with 2-color functionality and offset
  
      # Open test image (256px by 10px, black to white)
      with Image.open("Tests/images/bw_gradient.png") as im:
          im = im.convert("L")
  
      # Create image with original 2-color functionality with offsets
      im_test = ImageOps.colorize(
          im, black="red", white="green", blackpoint=50, whitepoint=100
      )
  
      # Test output image (2-color) with offsets
      left = (25, 1)
      middle = (75, 1)
      right = (125, 1)
      assert_tuple_approx_equal(
          im_test.getpixel(left),
          (255, 0, 0),
          threshold=1,
          msg="black test pixel incorrect",
      )
      assert_tuple_approx_equal(
          im_test.getpixel(middle),
          (127, 63, 0),
          threshold=1,
          msg="mid test pixel incorrect",
      )
      assert_tuple_approx_equal(
          im_test.getpixel(right),
          (0, 127, 0),
          threshold=1,
          msg="white test pixel incorrect",
      )
  
imports: from __future__ import annotations
  import pytest
  from PIL import Image, ImageDraw, ImageOps, ImageStat, features
  from .helper import assert_image_equal, assert_image_similar, assert_image_similar_tofile, assert_tuple_approx_equal, hopper
label_desc: Use image node_id 14 for calling a global function with example usage: test_colorize_2color_offset() without return types