code: def test_saturate():
      o = src.copy()
      o[0, 1] = 0
      np.testing.assert_equal(saturate(src, clear), o)
      np.testing.assert_equal(saturate(src, clear_white), o)
      o = np.full((3, 3), white, dtype="uint32")
      np.testing.assert_equal(saturate(src, white), o)
      o = np.full((3, 3), blue, dtype="uint32")
      np.testing.assert_equal(saturate(src, blue), o)
      o = np.array(
          [
              [0x7DFF0000, 0x7DFF0000, 0xFFFF8282],
              [0xFAFF0000, 0xFA7F7F00, 0xFA7F007F],
              [0xFFFF0000, 0xFF7D0000, 0xB7C01313],
          ]
      )
      np.testing.assert_equal(saturate(src, half_blue), o)
      o = np.array(
          [
              [0x7D7D007D, 0x7D7D007D, 0xFFBF82BF],
              [0xFABE003E, 0xFA3E7F3E, 0xFA3E00BE],
              [0xFFBF003D, 0xFF3D003D, 0xB7681368],
          ]
      )
      np.testing.assert_equal(saturate(src, half_purple), o)
  
imports: from __future__ import annotations
  import numpy
  from datashader.composite import add, saturate, over, source
label_desc: Use image node_id 4 for calling a global function with example usage: test_saturate() without return types