code: def test_float16_mode_nested_eligible_class(self, test_class):
      mixed_precision.enable(tf.float32)
  
      # TODO(loreno): test nested combo of tensor and Variables once the custom
      # variable getter can cast tensors.
      x = tf.Variable([[1.0, 9.0], [5.0, 0.0]])
      y = tf.Variable([[1.0, 9.0], [8.0, 9.0]])
      z = (x, y)
  
      d = test_class(z)
      d.check_type_structure = mixed_precision.modes(
          [tf.float32, tf.float16]
      )(d.check_type_structure)
  
      self.assertTrue(tree.is_nested(z))
      mixed_precision.enable(tf.float16)
  
      first_run = d.check_type_structure(z, tf.float32)
      self.assertEqual(first_run[0].dtype, tf.float32)
      self.assertEqual(first_run[1].dtype, tf.float32)
      second_run = d.check_type_structure(z, tf.float16)
      self.assertEqual(second_run[0].dtype, tf.float32)
      self.assertEqual(second_run[1].dtype, tf.float32)
  
imports: from absl.testing import parameterized
  from sonnet.src import base
  from sonnet.src import mixed_precision
  from sonnet.src import test_utils
  import tensorflow
  import tree
label_desc: Use image node_id 3 for calling the MixedPrecisionClassTest obj's underlying member method code with example usage: obj.test_float16_mode_nested_eligible_class(test_class) without return types