code: def sharded_paths(
      path: str, module_names: List[str]
  ) -> Dict[str, str]:
      model_name = "model.safetensors"
      if not os.path.exists(
          str(Path(path) / model_name)
      ) and not os.path.exists(
          str(Path(path) / f"{model_name}.index.json")
      ):
          model_name = "pytorch_model.bin"
  
      index_path = str(Path(path) / f"{model_name}.index.json")
      if os.path.exists(index_path):
          with open(index_path, "r", encoding="utf-8") as file:
              data = json.load(file)
          return data["weight_map"]
      return {
          (module_name + ".weight"): model_name
          for module_name in module_names
      }
  
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 2 for calling a global function with example usage: sharded_paths(path, module_names) and returns: unknown, data