code: def _testDilationGradDeterminismError(self, use_gpu, dtype):
      if use_gpu and test.is_gpu_available(cuda_only=True):
          try:
              config.enable_op_determinism()
              with self.assertRaisesRegexp(
                  errors_impl.UnimplementedError,
                  "Determinism is not yet supported "
                  "for Dilation2DBackpropInput.",
              ):
                  self._ConstructAndTestGradient(
                      image_shape=[1, 3, 3, 1],
                      kernel_shape=[1, 1, 1],
                      strides=[1, 1],
                      rates=[1, 1],
                      padding="VALID",
                      use_gpu=use_gpu,
                      dtype=dtype,
                  )
          finally:
              config.disable_op_determinism()
      else:
          try:
              config.enable_op_determinism()
              self._ConstructAndTestGradient(
                  image_shape=[1, 3, 3, 1],
                  kernel_shape=[1, 1, 1],
                  strides=[1, 1],
                  rates=[1, 1],
                  padding="VALID",
                  use_gpu=use_gpu,
                  dtype=dtype,
              )
          finally:
              config.disable_op_determinism()
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import nn_ops
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 12 for calling the DilationTest obj's underlying member method code with example usage: obj._testDilationGradDeterminismError(use_gpu, dtype) without return types