code: def format_param(name, optim, param):
      if isinstance(param, numbers.Number):
          return [param] * len(optim.param_groups)
      elif isinstance(param, (list, tuple)):  # multi param groups
          if len(param) != len(optim.param_groups):
              raise ValueError(
                  f"expected {len(optim.param_groups)} "
                  f"values for {name}, got {len(param)}"
              )
          return param
      else:  # multi optimizers
          if name not in param:
              raise KeyError(f"{name} is not found in {param.keys()}")
          return param[name]
  
imports: import numbers
  from math import cos, pi
  import annotator.uniformer.mmcv
  from .hook import HOOKS, Hook
label_desc: Use image node_id 4 for calling a global function with example usage: format_param(name, optim, param) and returns: unknown, param, param