code: def prepare_backward_with_master_weights(self):
      stash = self._amp_stash
  
      self._amp_lazy_init()
  
      for i, param in enumerate(stash.all_fp16_params):
          # Set up to leverage grad copy elision.
          # This may behave differently from an unpatched optimizer if zero_grad is used and the param is unused.
          param.grad = None
  
      # for i, param in enumerate(stash.all_fp32_from_fp16_params):
      #     stash.all_fp32_from_fp16_grad_stash[i] = param.grad
  
      for i, param in enumerate(stash.all_fp32_from_fp32_params):
          stash.all_fp32_from_fp32_grad_stash[i] = param.grad
          # Set up to leverage grad copy elision:
          param.grad = None
  
imports: import types
  from ..fp16_utils import master_params_to_model_params
  from ..multi_tensor_apply import multi_tensor_applier
  from ._amp_state import maybe_print
  import torch
  from ..optimizers import FusedSGD
label_desc: Use image node_id 4 for calling a global function with example usage: prepare_backward_with_master_weights() without return types