class_docstr: Test d9m-unimplemented exceptions from ResizeNearestNeighborOpGrad.
  
  Test that tf.errors.UnimplementedError is thrown, as appropriate, by the
  GPU-specific code-path through ResizeNearestNeighborOpGrad when deterministic
  ops are enabled.
  
  This test assumes that image_grad_test.py runs equivalent test cases when
  deterministic ops are not enabled and will therefore detect erroneous
  exception throwing in those cases.
code: def testExceptionThrowing(
      self, align_corners, half_pixel_centers, data_type
  ):
      with self.session(), test_util.force_gpu():
          input_image = array_ops.zeros((1, 2, 2, 1), dtype=data_type)
          with backprop.GradientTape() as tape:
              tape.watch(input_image)
              output_image = image_ops.resize_nearest_neighbor(
                  input_image,
                  (3, 3),
                  align_corners=align_corners,
                  half_pixel_centers=half_pixel_centers,
              )
          with self.assertRaisesRegex(
              errors.UnimplementedError,
              "A deterministic GPU implementation of ResizeNearestNeighborGrad"
              + " is not currently available.",
          ):
              gradient = tape.gradient(output_image, input_image)
              self.evaluate(gradient)
  
imports: import numpy
  from absl.testing import parameterized
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import random_seed
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import image_grad_test_base
  from tensorflow.python.ops import image_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the ResizeNearestNeighborOpDeterminismExceptionsTest obj's underlying member method code with example usage: obj.testExceptionThrowing(align_corners, half_pixel_centers, data_type) without return types