code: def test_translate_xy():
      image = np.random.randint(
          low=0, high=255, size=(4, 4, 3), dtype=np.uint8
      )
      translate = np.random.randint(
          low=0, high=4, size=(2,), dtype=np.uint8
      )
      translate = tf.constant(translate)
      color = tf.constant([255, 0, 255], tf.dtypes.uint8)
  
      tf_image = tf.constant(image)
      pil_image = Image.fromarray(image)
  
      translated = translate_ops.translate_xy(
          image=tf_image,
          translate_to=tf.constant(translate),
          replace=color,
      )
      expected = pil_image.rotate(
          angle=0,
          resample=Image.NEAREST,
          translate=tuple(translate.numpy()),
          fillcolor=tuple(color.numpy()),
      )
  
      np.testing.assert_equal(translated.numpy(), expected)
  
file_path: addons/tensorflow_addons/image/tests/translate_ops_test.py
imports: import numpy
  import pytest
  import scipy
  import tensorflow
  from PIL import Image
  from tensorflow_addons.image import translate_ops
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_translate_xy() without return types