code: def test_translate_xy_scalar_replace(dtype):
      image = np.random.randint(low=0, high=128, size=(4, 4, 3)).astype(
          dtype.as_numpy_dtype
      )
      translate_to = np.random.randint(low=0, high=4, size=(2,))
      result = translate_ops.translate_xy(
          image=image, translate_to=translate_to, replace=1
      )
      expected = scipy.ndimage.shift(
          input=image,
          shift=(translate_to[1], translate_to[0], 0),
          order=0,
          mode="constant",
          cval=1,
      )
      test_utils.assert_allclose_according_to_type(
          result.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 4 for calling a global function with example usage: test_translate_xy_scalar_replace(dtype) without return types