code: def testFixedLossScaleAppliedToLossWithGetGradients(self):
      var = variables.Variable([2.0])
      opt = gradient_descent.GradientDescentOptimizer(1.0)
      loss_scale = 10.0
      opt = loss_scale_optimizer.MixedPrecisionLossScaleOptimizer(
          opt, loss_scale
      )
      grad_check_fn = create_identity_with_grad_check_fn(loss_scale)
      loss = grad_check_fn(var)
      run_op = get_gradients(opt, loss, [var])
      self.evaluate(variables.global_variables_initializer())
      # This will cause an assertion to run, as
      # create_identity_with_grad_check_fn added an assertion op.
      self.evaluate(run_op)
  
imports: import os
  from absl.testing import parameterized
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.distribute import mirrored_strategy
  from tensorflow.python.eager import context
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_conversion
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import custom_gradient
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.training import gradient_descent
  from tensorflow.python.training import momentum
  from tensorflow.python.training.experimental import loss_scale
  from tensorflow.python.training.experimental import loss_scale_optimizer
label_desc: Use image node_id 4 for calling the MixedPrecisionLossScaleOptimizerTest obj's underlying member method code with example usage: obj.testFixedLossScaleAppliedToLossWithGetGradients() without return types