code: def asdict(self):
      d = {"params": self.params, "name": self.name}
      if self.lr is not None:
          d["lr"] = self.lr
      if self.weight_decay is not None:
          d["weight_decay"] = self.weight_decay
      return d
  
file_path: pytorch-toolbelt/pytorch_toolbelt/optimization/functional.py
imports: import dataclasses
  import numbers
  from typing import Optional, Iterator, Dict, Union, List, Tuple, Mapping
  from torch import nn
  from pytorch_toolbelt.utils.distributed import get_rank, get_world_size, is_dist_avail_and_initialized
  from pytorch_toolbelt.utils.torch_utils import get_non_wrapped_model
label_desc: Use image node_id 2 for calling the ParametersGroup obj's underlying member method code with example usage: obj.asdict() and returns: d