class_docstr: Common tests for Sonnet optimizers.
code: def testInconsistentDTypes(self):
      optimizer = self.make_optimizer()
      if is_tf_optimizer(optimizer):
          self.skipTest(
              "TF optimizers raise a cryptic error message here."
          )
  
      parameters = [tf.Variable([1.0, 2.0], name="param0")]
      updates = [tf.constant([5, 5])]
      with self.assertRaisesRegex(
          ValueError,
          "DType of .* is not equal to that of parameter .*param0.*",
      ):
          optimizer.apply(updates, parameters)
  
imports: import itertools
  from absl.testing import parameterized
  import numpy
  from sonnet.src import base
  from sonnet.src import test_utils
  import tensorflow
  import tree
label_desc: Use image node_id 6 for calling the OptimizerTestBase obj's underlying member method code with example usage: obj.testInconsistentDTypes() without return types