code: def test_translate(dtype):
      image = tf.constant(
          [[1, 0, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0], [0, 1, 0, 1]],
          dtype=dtype,
      )
      translation = tf.constant([-1, -1], dtype=tf.float32)
      image_translated = translate_ops.translate(image, translation)
      np.testing.assert_equal(
          image_translated.numpy(),
          [[1, 0, 1, 0], [0, 1, 0, 0], [1, 0, 1, 0], [0, 0, 0, 0]],
      )
  
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 1 for calling a global function with example usage: test_translate(dtype) without return types