class_docstr: Common tests for Sonnet optimizers.
code: def testDifferentLengthUpdatesParams(self):
      optimizer = self.make_optimizer()
      if is_tf_optimizer(optimizer):
          self.skipTest(
              "TF optimizers don't check the lenghs of params/updates."
          )
  
      parameters = [tf.Variable([1.0, 2.0]), tf.Variable([3.0, 4.0])]
      updates = [tf.constant([5.0, 5.0])]
      with self.assertRaisesRegex(
          ValueError,
          "`updates` and `parameters` must be the same length.",
      ):
          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 3 for calling the OptimizerTestBase obj's underlying member method code with example usage: obj.testDifferentLengthUpdatesParams() without return types