code: def state_dict(destination=None):
      if destination is None:
          destination = OrderedDict()
  
      for idx, loss_scaler in enumerate(_amp_state.loss_scalers):
          destination["loss_scaler%d" % idx] = {
              "loss_scale": loss_scaler.loss_scale(),
              "unskipped": loss_scaler._unskipped,
          }
      return destination
  
imports: from collections import OrderedDict
  import torch
  from ._initialize import _initialize
  from ._amp_state import _amp_state, warn_or_err, maybe_print
label_desc: Use image node_id 2 for calling a global function with example usage: state_dict(destination) and returns: destination