code: def copy_weights(
      model_src: torch.nn.Module, model_tgt: torch.nn.Module
  ) -> torch.nn.Module:
      """Copy `state_dict` from source model to target model.
  
      Args:
          model_src: The source model.
          model_tgt: The target model.
  
      Returns:
          Target model with `state_dict` loaded from model_src.
      """
      with torch.no_grad():
          model_state = get_model_state_dict(model=model_src)
          return load_state_dict(
              model=model_tgt, state_dict=model_state
          )
  
imports: import argparse
  import glob
  import math
  import os
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  from cvnets import EMA
  from optim import BaseOptim
  from utils import logger
  from utils.common_utils import unwrap_model_fn
  from utils.ddp_utils import is_master
  from utils.download_utils import get_local_path
label_desc: Use image node_id 10 for calling a global function with example usage: copy_weights(model_src, model_tgt) and returns: load_state_dict