code: def test_register_loss_scale_wrapper_with_2_arguments(self):
      class MyOptimizer:
          pass
  
      class MyLossScaleOptimizer(MyOptimizer):
          def __init__(self, inner_optimizer, loss_scale):
              self.inner_optimizer = inner_optimizer
              self.loss_scale = loss_scale
  
      mixed_precision.register_loss_scale_wrapper(
          MyOptimizer, MyLossScaleOptimizer
      )
      opt = MyOptimizer()
      opt = mixed_precision.enable_mixed_precision_graph_rewrite_v1(
          opt, 123.0
      )
      self.assertIsInstance(opt, MyLossScaleOptimizer)
      self.assertEqual(opt.loss_scale, 123.0)
  
imports: import os
  from absl.testing import parameterized
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import config
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.training import gradient_descent
  from tensorflow.python.training.experimental import loss_scale_optimizer
  from tensorflow.python.training.experimental import mixed_precision
  from tensorflow.python.training.experimental import mixed_precision_global_state
label_desc: Use image node_id 5 for calling the MixedPrecisionTest obj's underlying member method code with example usage: obj.test_register_loss_scale_wrapper_with_2_arguments() without return types