class_docstr: An abstract class providing basic methods for saving and loading weights of a model. Extend this class to build
  custom module weight loaders.
class_docstr_tok: ["An","abstract","class","providing","basic","methods","for","saving","and","loading","weights","of","a","model",".","Extend","this","class","to","build","custom","module","weight","loaders","."]
docstr: The callable returned by this method is used to optionally rename the module weights after loading.
  
  Args:
      old_name (str): The string identifier of the weights as loaded from file.
      new_name (str): The new string identifier to which the weights should be renamed.
  
  Returns:
      Callable[str, str]: A function that takes the fully qualified name of a module parameter and returns a new
      fully qualified name.
code: def rename_func(
      self, old_name: str, new_name: str
  ) -> Callable[[str], str]:
      """
      The callable returned by this method is used to optionally rename the module weights after loading.
  
      Args:
          old_name (str): The string identifier of the weights as loaded from file.
          new_name (str): The new string identifier to which the weights should be renamed.
  
      Returns:
          Callable[str, str]: A function that takes the fully qualified name of a module parameter and returns a new
          fully qualified name.
      """
      pass
  
imports: import json
  import logging
  from abc import ABC, abstractmethod
  from os import mkdir
  from os.path import exists, isdir, isfile, join
  from typing import Callable, Mapping, Sequence, Tuple
  import torch
  from .configuration import AdapterConfig, build_full_config
  from .head_utils import STATIC_TO_FLEX_HEAD_MAP, get_head_config_and_rename_list
  from .utils import ACTIVATION_RENAME, ADAPTERFUSION_CONFIG_NAME, ADAPTERFUSION_WEIGHTS_NAME, CONFIG_NAME, HEAD_CONFIG_NAME, HEAD_WEIGHTS_NAME, WEIGHTS_NAME, AdapterType, resolve_adapter_path
label_desc: Use image node_id 3 for calling the WeightsLoader obj's underlying member method code with example usage: obj.rename_func(old_name, new_name) without return types