code: def get_pose_model(cfg, model_path=None):
      pose_model = PoseModel(cfg)
      if model_path is not None:
          state_dict = torch.load(model_path)["state_dict"]
          pose_model.load_state_dict(state_dict)
      return pose_model
  
imports: import torch
  import torch.nn
  import numpy
  import pickle
  from lib.utils.misc import init_weights, load_pickle
  from lib.utils.utils import Transform3D, transform_3d, transform_3d_v2
  from lib.models.building_blocks import ResBlock
  from lib.models.scaler import get_scaler
  from lib.models.rotater import get_rotater
  from lib.models.lifter import get_lifter_before, get_lifter_after
  from lib.models.simple_model import LinearModelBefore, LinearModelAfter, Linear
  from lib.utils.utils import rotate, rotate2
label_desc: Use image node_id 1 for calling a global function with example usage: get_pose_model(cfg, model_path) and returns: pose_model