code: def unscale(
      self,
      model_grads,
      master_grads,
      unused_scale,
      models_are_masters=False,
      scale_override=None,
  ):
      if self._has_overflow:
          return
  
      scale = self._loss_scale
      if scale_override is not None:
          scale = scale_override
  
      if scale == 1.0 and models_are_masters and not self.dynamic:
          return
  
      if LossScaler.has_fused_kernel:
          # if (not LossScaler.warned_unscaling_non_fp32_grad
          #     and master_grads[0].dtype == torch.float16):
          #     print("Warning:  unscaling grads that are not FP32. "
          #           "Unscaling non-fp32 grads may indicate an error. "
          #           "When using Amp, you don't need to call .half() on your model.")
          #     # Setting this to True unconditionally allows the possibility of an escape
          #     # if never-before-seen non-fp32 grads are created in some later iteration.
          #     LossScaler.warned_unscaling_non_fp32_grad = True
          multi_tensor_applier(
              LossScaler.multi_tensor_scale_cuda,
              self._overflow_buf,
              [model_grads, master_grads],
              1.0 / scale,
          )
      else:
          self.unscale_python(model_grads, master_grads, scale)
  
file_path: apex/apex/amp/scaler.py
imports: import torch
  from ..multi_tensor_apply import multi_tensor_applier
  from ._amp_state import _amp_state, master_params, maybe_print
  from itertools import product
label_desc: Use image node_id 4 for calling the LossScaler obj's underlying member method code with example usage: obj.unscale(model_grads, master_grads, unused_scale, models_are_masters, scale_override) without return types