code: def step(self, optimizer, classifier=None):
      if not self._enable:
          if classifier is not None:
              classifier.step(optimizer)
          return optimizer.step()
  
      # unscale the grad
      self._unscale(optimizer)
  
      if self._found_inf:
          self._cache_founf_inf = True
      else:
          optimizer.step()
          if classifier is not None:
              classifier.step(optimizer)
  
          self._cache_founf_inf = False
  
      if self._use_dynamic_loss_scaling:
          # update the scale
          self._update()
  
file_path: insightface/recognition/arcface_paddle/dynamic/utils/amp.py
imports: from collections import defaultdict
  from paddle.amp import GradScaler
  from paddle import _C_ops
  import paddle
label_desc: Use image node_id 2 for calling the LSCGradScaler obj's underlying member method code with example usage: obj.step(optimizer, classifier) and returns: optimizer