code: def weights_update(model, checkpoint):
      """Load the pre-trained parameters to the model."""
      model_dict = model.state_dict()
      pretrained_dict = {
          k: v
          for k, v in checkpoint["state_dict"].items()
          if k in model_dict
      }
      model_dict.update(pretrained_dict)
      model.load_state_dict(model_dict)
      return model
  
file_path: pykale/examples/action_dann/test.py
imports: import argparse
  import logging
  import pytorch_lightning
  import torch
  from config import get_cfg_defaults
  from model import get_model
  from kale.loaddata.video_access import VideoDataset
  from kale.loaddata.video_multi_domain import VideoMultiDomainDatasets
label_desc: Use image node_id 2 for calling a global function with example usage: weights_update(model, checkpoint) and returns: model