code: def to_model_params(
      model_pgs: list,  # Fp16 model params to copy to
      master_pgs: list,  # Fp32 master params to copy from
      flat_master: bool = False,  # Whether master_pgs was previously flattened
  ) -> None:
      "Copy updated fp32 master params to fp16 model params after gradient step."
      for model_params, master_params in zip(model_pgs, master_pgs):
          master_params_to_model_params(
              model_params, master_params, flat_master=flat_master
          )
  
imports: from __future__ import annotations
  from ..basics import *
  from .progress import *
  from torch.cuda.amp import GradScaler, autocast
  from torch.cuda.amp.grad_scaler import OptState
  from ..fp16_utils import convert_network, model_grads_to_master_grads, master_params_to_model_params
  from torch.nn.utils import parameters_to_vector
label_desc: Use image node_id 6 for calling a global function with example usage: to_model_params(model_pgs, master_pgs, flat_master) without return types