code: def load_weight_checkpoint(
      model: peft.LoraModel, checkpoint_path: str
  ):
      modules = find_lora_modules(model)
      shard_paths = sharded_paths(checkpoint_path, modules.keys())
      unique_shards = list(set(shard_paths.values()))
  
      for shard_path in unique_shards:
          tensors = st.load_file(
              os.path.join(checkpoint_path, shard_path)
          )
  
          for module_name, target in modules.items():
              key = module_name + ".weight"
              if (
                  key not in shard_paths
                  or shard_paths[key] != shard_path
              ):
                  continue
  
              new_weight = tensors[key]
              update_weights(
                  target,
                  new_weight,
                  reinit=False,
                  device=target.weight.device,
              )
  
imports: import glob
  import json
  import logging
  import os.path
  import shutil
  from pathlib import Path
  from typing import Dict, List, Sequence
  import bitsandbytes
  import peft
  import safetensors.torch
  import torch
  from huggingface_hub import snapshot_download
  from torch.optim.lr_scheduler import LRScheduler
  from torch.optim.optimizer import Optimizer
  from transformers import TrainerCallback, TrainerControl, TrainerState, TrainingArguments
  from transformers.trainer_utils import PREFIX_CHECKPOINT_DIR
  from axolotl.utils.dict import DictDefault
  from axolotl.utils.distributed import is_main_process
label_desc: Use image node_id 7 for calling a global function with example usage: load_weight_checkpoint(model, checkpoint_path) without return types