class_docstr: Test d9m-unimplemented exceptions from CropAndResizeBackprop{Image|Boxes}.
  
  Test that tf.errors.UnimplementedError is thrown or not thrown, as
  appropriate, by the GPU code-paths for CropAndResizeBackprop{Image|Boxes} when
  deterministic ops are enabled.
  
  This test assumes that test_base.CropAndResizeOpTestBase runs all the same
  test cases when deterministic ops are not enabled and will therefore detect
  erroneous exception throwing in those cases.
code: def testExceptionThrowing(self):
      for dtype in [dtypes.float16, dtypes.float32, dtypes.float64]:
          image, boxes, box_indices, crop_size = self._genParams(dtype)
          with backprop.GradientTape(persistent=True) as tape:
              tape.watch(image)
              tape.watch(boxes)
              op_output = image_ops.crop_and_resize_v2(
                  image, boxes, box_indices, crop_size
              )
          image_error_message = (
              "Deterministic GPU implementation of"
              + " CropAndResizeBackpropImage not available"
          )
          with self.assertRaisesRegex(
              errors_impl.UnimplementedError, image_error_message
          ):
              result = tape.gradient(op_output, image)
              self.evaluate(result)
          expected_error_message = (
              "Deterministic GPU implementation of"
              + " CropAndResizeBackpropBoxes not available"
          )
          if context.executing_eagerly():
              # With eager execution, the backprop-to-image code is apparently
              # executed (first), even when its output is never used.
              expected_error_message = image_error_message
          with self.assertRaisesRegex(
              errors_impl.UnimplementedError, expected_error_message
          ):
              result = tape.gradient(op_output, boxes)
              self.evaluate(result)
  
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 2 for calling the CropAndResizeOpDeterminismExceptionsTest obj's underlying member method code with example usage: obj.testExceptionThrowing() without return types