class_docstr: Clips gradients before doing optimization step.
  
  Args:
      optimizer (KeyedOptimizer): optimizer to wrap
      clipping (GradientClipping): how to clip gradients
      max_gradient (float): max value for clipping
code: def __init__(
      self,
      optimizer: KeyedOptimizer,
      clipping: GradientClipping = GradientClipping.NONE,
      max_gradient: float = 0.1,
  ) -> None:
      super().__init__(optimizer)
      self._clipping = clipping
      self._max_gradient = max_gradient
      self._check_meta: bool = True
  
      self._params: List[torch.Tensor] = []
      for param_group in self.param_groups:
          self._params += list(param_group["params"])
  
file_path: torchrec/torchrec/optim/clipping.py
imports: from enum import Enum, unique
  from typing import Any, List
  import torch
  from torchrec.optim.keyed import KeyedOptimizer, OptimizerWrapper
label_desc: Use image node_id 1 to create a new GradientClippingOptimizer object from inherited base classes: OptimizerWrapper with example: obj = GradientClippingOptimizer(optimizer, clipping, max_gradient)