code: def reload_model(model, path=""):
      if not bool(path):
          return model
      else:
          model_dict = model.state_dict()
          pretrained_dict = torch.load(path, map_location="cpu")
          pretrained_dict = {
              k: v
              for k, v in pretrained_dict.items()
              if k in model_dict and v.size() == model_dict[k].size()
          }
          model_dict.update(pretrained_dict)
          print("load {} parameters".format(len(pretrained_dict)))
          model.load_state_dict(model_dict)
          return model
  
imports: import cvtransforms
  import face_alignment
  import numpy
  import skimage.transform
  import skvideo.io
  import torch
  from models import pretrained
label_desc: Use image node_id 1 for calling a global function with example usage: reload_model(model, path) and returns: model, model