code: def test_raw_ops(
      self,
      compute_unit,
      backend,
      input_shape,
      target_shape,
      align_corners,
      half_pixel_centers,
  ):
      if align_corners is True and half_pixel_centers is True:
          return
  
      if backend[0] == "neuralnetwork":
          # neural network backend does not support fractional scale factors for nearest neighbor upsample op
          if target_shape[-1] % input_shape[-1] != 0:
              return
          if target_shape[-2] % input_shape[-2] != 0:
              return
  
      if (
          backend[0] == "mlprogram"
          and compute_unit != ct.ComputeUnit.CPU_ONLY
          and not half_pixel_centers
      ):
          pytest.xfail(
              "rdar://97399545 (TestResizeNearestNeighbor failing on mlprogram + GPU + half_pixel_centers=False)"
          )
  
      @make_tf_graph([input_shape])
      def build_model(x):
          return tf.raw_ops.ResizeNearestNeighbor(
              images=x,
              size=target_shape,
              align_corners=align_corners,
              half_pixel_centers=half_pixel_centers,
          )
  
      model, inputs, outputs = build_model
      input_values = [random_gen(input_shape, -100, 100)]
      input_dict = dict(zip(inputs, input_values))
      TensorFlowBaseTest.run_compare_tf(
          model,
          input_dict,
          outputs,
          compute_unit=compute_unit,
          backend=backend,
      )
  
imports: import itertools
  import numpy
  import pytest
  import coremltools
  from coremltools.converters.mil import testing_reqs
  from coremltools.converters.mil.frontend.tensorflow.test.testing_utils import TensorFlowBaseTest
  from coremltools.converters.mil.frontend.tensorflow2.test.testing_utils import TensorFlow2BaseTest
  from coremltools.converters.mil.frontend.tensorflow2.test.testing_utils import make_tf2_graph
  from coremltools.converters.mil.testing_utils import random_gen
label_desc: Use image node_id 1 for calling the TestResizeNearestNeighbor obj's underlying member method code with example usage: obj.test_raw_ops(compute_unit, backend, input_shape, target_shape, align_corners, half_pixel_centers) and returns: tf