code: def get_config_from_weights(w_path, arch_params, name):
      """
      Extracts architecture parameters from the file name of the weights.
      Only works with standardized weights name.
      """
  
      w_path = os.path.basename(w_path)
      parts = w_path.split(name)[1]
      parts = parts.split("_")[0]
      parts = parts.split("-")
      new_param = {}
      for param in arch_params:
          param_part = [x for x in parts if param in x]
          param_value = int(param_part[0].split(param)[1])
          new_param[param] = param_value
      return new_param
  
file_path: image-super-resolution/ISR/utils/utils.py
imports: import os
  import argparse
  from datetime import datetime
  import numpy
  import yaml
  from ISR.utils.logger import get_logger
label_desc: Use image node_id 5 for calling a global function with example usage: get_config_from_weights(w_path, arch_params, name) and returns: new_param