code: def test_blend(dtype):
      image1 = tf.constant(
          [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
          dtype=dtype,
      )
      image2 = tf.constant(
          [
              [255, 255, 255, 255],
              [255, 255, 255, 255],
              [255, 255, 255, 255],
              [255, 255, 255, 255],
          ],
          dtype=dtype,
      )
      blended = compose_ops.blend(image1, image2, 0.5).numpy()
      np.testing.assert_equal(
          blended,
          [
              [128, 128, 128, 128],
              [128, 128, 128, 128],
              [128, 128, 128, 128],
              [128, 128, 128, 128],
          ],
      )
  
      np.random.seed(0)
      image1 = np.random.randint(0, 255, (3, 5, 5), np.uint8)
      image2 = np.random.randint(0, 255, (3, 5, 5), np.uint8)
      tf.random.set_seed(0)
      factor = tf.random.uniform(
          shape=[], maxval=1, dtype=tf.dtypes.float32, seed=0
      )
      blended = compose_ops.blend(
          tf.convert_to_tensor(image1),
          tf.convert_to_tensor(image2),
          factor,
      ).numpy()
      expected = blend_np(image1, image2, factor.numpy())
      np.testing.assert_equal(blended, expected)
      assert blended.dtype == expected.dtype
  
imports: import pytest
  import tensorflow
  import numpy
  from tensorflow_addons.image import compose_ops
label_desc: Use image node_id 2 for calling a global function with example usage: test_blend(dtype) without return types