code: def assert_move_single_pixel(order, num_boundary_points, type_to_use):
      """Move a single block in a small grid using warping."""
      batch_size = 1
      image_height = 7
      image_width = 7
      channels = 3
  
      image = np.zeros(
          [batch_size, image_height, image_width, channels]
      )
      image[:, 3, 3, :] = 1.0
      input_image = tf.constant(image, dtype=type_to_use)
  
      # Place a control point at the one white pixel.
      control_point_locations = [[3.0, 3.0]]
      control_point_locations = tf.constant(
          np.float32(np.expand_dims(control_point_locations, 0)),
          dtype=type_to_use,
      )
      # Shift it one pixel to the right.
      control_point_displacements = [[0.0, 1.0]]
      control_point_displacements = tf.constant(
          np.float32(np.expand_dims(control_point_displacements, 0)),
          dtype=type_to_use,
      )
  
      (warped_image, flow) = sparse_image_warp(
          input_image,
          control_point_locations,
          control_point_locations + control_point_displacements,
          interpolation_order=order,
          num_boundary_points=num_boundary_points,
      )
  
      # Check that it moved the pixel correctly.
      np.testing.assert_allclose(
          warped_image[0, 4, 5, :],
          input_image[0, 4, 4, :],
          atol=1e-5,
          rtol=1e-5,
      )
  
      # Test that there is no flow at the corners.
      for i in (0, image_height - 1):
          for j in (0, image_width - 1):
              np.testing.assert_allclose(
                  flow[0, i, j, :], np.zeros([2]), atol=1e-5, rtol=1e-5
              )
  
file_path: addons/tensorflow_addons/image/tests/sparse_image_warp_test.py
imports: from collections import namedtuple
  import numpy
  import pytest
  import tensorflow
  from tensorflow_addons.image import sparse_image_warp
  from tensorflow_addons.image.sparse_image_warp import _get_boundary_locations
  from tensorflow_addons.image.sparse_image_warp import _get_grid_locations
  from tensorflow_addons.utils.resource_loader import get_path_to_datafile
label_desc: Use image node_id 6 for calling a global function with example usage: assert_move_single_pixel(order, num_boundary_points, type_to_use) without return types