code: def _check_interpolation_correctness(
      shape,
      image_type,
      flow_type,
      call_with_unknown_shapes=False,
      num_probes=5,
  ):
      """Interpolate, and then assert correctness for a few query
      locations."""
      low_precision = image_type == "float16" or flow_type == "float16"
      rand_image, rand_flows = _get_random_image_and_flows(
          shape, image_type, flow_type
      )
  
      if call_with_unknown_shapes:
          fn = dense_image_warp.get_concrete_function(
              tf.TensorSpec(shape=None, dtype=image_type),
              tf.TensorSpec(shape=None, dtype=flow_type),
          )
          interp = fn(
              image=tf.convert_to_tensor(rand_image),
              flow=tf.convert_to_tensor(rand_flows),
          )
      else:
          interp = dense_image_warp(
              image=tf.convert_to_tensor(rand_image),
              flow=tf.convert_to_tensor(rand_flows),
          )
  
      for _ in range(num_probes):
          batch_index = np.random.randint(0, shape[0])
          y_index = np.random.randint(0, shape[1])
          x_index = np.random.randint(0, shape[2])
  
          _assert_correct_interpolation_value(
              rand_image,
              rand_flows,
              interp,
              batch_index,
              y_index,
              x_index,
              low_precision=low_precision,
          )
  
file_path: addons/tensorflow_addons/image/tests/dense_image_warp_test.py
imports: import pytest
  import math
  import numpy
  import tensorflow
  from tensorflow_addons.image import dense_image_warp
  from tensorflow_addons.image import interpolate_bilinear
label_desc: Use image node_id 10 for calling a global function with example usage: _check_interpolation_correctness(shape, image_type, flow_type, call_with_unknown_shapes, num_probes) without return types