code: def test_op_forward_pass(dtype):
      np.random.seed(0)
      data_width = 7
      data_height = 9
      data_channels = 5
      warp_width = 4
      warp_height = 8
      batch_size = 10
  
      warp = _make_warp(batch_size, warp_height, warp_width, dtype)
      data_shape = (batch_size, data_height, data_width, data_channels)
      data = np.random.rand(*data_shape).astype(dtype)
      data_ph = tf.constant(data)
      warp_ph = tf.constant(warp)
      outputs = resampler_ops.resampler(data=data_ph, warp=warp_ph)
      assert outputs.shape == (
          10,
          warp_height,
          warp_width,
          data_channels,
      )
  
      # Generate reference output via bilinear interpolation in numpy
      reference_output = np.zeros_like(outputs)
      for batch in range(batch_size):
          for c in range(data_channels):
              reference_output[
                  batch, :, :, c
              ] = _bilinearly_interpolate(
                  data[batch, :, :, c],
                  warp[batch, :, :, 0],
                  warp[batch, :, :, 1],
              )
  
      test_utils.assert_allclose_according_to_type(
          outputs, reference_output, half_rtol=5e-3, half_atol=5e-3
      )
  
file_path: addons/tensorflow_addons/image/tests/resampler_ops_test.py
imports: import numpy
  import pytest
  import tensorflow
  from tensorflow_addons.image import resampler_ops
  from tensorflow_addons.utils import test_utils
label_desc: Use image node_id 3 for calling a global function with example usage: test_op_forward_pass(dtype) without return types