code: def parameter_list(
      named_parameters,
      weight_decay: Optional[float] = 0.0,
      no_decay_bn_filter_bias: Optional[bool] = False,
      *args,
      **kwargs,
  ) -> List[Dict]:
      module_name = kwargs.get("module_name", "")
      with_decay = []
      without_decay = []
      with_decay_param_names = []
      without_decay_param_names = []
      if isinstance(named_parameters, list):
          for n_parameter in named_parameters:
              for p_name, param in n_parameter():
                  if (
                      param.requires_grad
                      and len(param.shape) == 1
                      and no_decay_bn_filter_bias
                  ):
                      # biases and normalization layer parameters are of len 1
                      without_decay.append(param)
                      without_decay_param_names.append(
                          module_name + p_name
                      )
                  elif param.requires_grad:
                      with_decay.append(param)
                      with_decay_param_names.append(
                          module_name + p_name
                      )
      else:
          for p_name, param in named_parameters():
              if (
                  param.requires_grad
                  and len(param.shape) == 1
                  and no_decay_bn_filter_bias
              ):
                  # biases and normalization layer parameters are of len 1
                  without_decay.append(param)
                  without_decay_param_names.append(module_name + p_name)
              elif param.requires_grad:
                  with_decay.append(param)
                  with_decay_param_names.append(module_name + p_name)
      param_list = [
          {
              "params": with_decay,
              "weight_decay": weight_decay,
              "param_names": with_decay_param_names,
          }
      ]
      if len(without_decay) > 0:
          param_list.append(
              {
                  "params": without_decay,
                  "weight_decay": 0.0,
                  "param_names": without_decay_param_names,
              }
          )
      return param_list
  
file_path: ml-cvnets/cvnets/misc/common.py
imports: import argparse
  import os
  import re
  from types import MethodType
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from utils import logger
  from utils.common_utils import unwrap_model_fn
  from utils.ddp_utils import is_master, is_start_rank_node
label_desc: Use image node_id 3 for calling a global function with example usage: parameter_list(named_parameters, weight_decay, no_decay_bn_filter_bias) and returns: param_list