code: def load_pretrained_weights(self, pretrained_path=""):
      model_dict = self.state_dict()
  
      if not os.path.exists(pretrained_path):
          print(f'\nFile "{pretrained_path}" does not exist.')
          print(
              "You need to specify the correct path to the pre-trained weights.\n"
              "You can download the weights for HRNet from the repository:\n"
              "https://github.com/HRNet/HRNet-Image-Classification"
          )
          exit(1)
      pretrained_dict = torch.load(
          pretrained_path, map_location={"cuda:0": "cpu"}
      )
      pretrained_dict = {
          k.replace("last_layer", "aux_head").replace("model.", ""): v
          for k, v in pretrained_dict.items()
      }
      params_count = len(pretrained_dict)
  
      pretrained_dict = {
          k: v
          for k, v in pretrained_dict.items()
          if k in model_dict.keys()
      }
  
      print_info(
          f"Loaded {len(pretrained_dict)} of {params_count} pretrained parameters for HRNet"
      )
  
      model_dict.update(pretrained_dict)
      self.load_state_dict(model_dict)
  
imports: import os
  import torch
  import torch._utils
  import numpy
  import torch.nn
  import torch.nn.functional
  from cftool.misc import print_info
  from .ocr import SpatialOCR_Module
  from .ocr import SpatialGather_Module
  from .resnetv1b import BottleneckV1b
  from .resnetv1b import BasicBlockV1b
label_desc: Use image node_id 8 for calling the HighResolutionNet obj's underlying member method code with example usage: obj.load_pretrained_weights(pretrained_path) without return types