code: def __init__(self, *args, **kwargs):
      super().__init__(*args, **kwargs)
      for group in self.param_groups:
          group.setdefault("count", 0)
  
imports: import math
  import random
  import omegaconf
  import pytest
  import pytorch_lightning
  import torch
  import torch.optim
  from pytorch_lightning.utilities import rank_zero_only
  from nemo.core import config, optim
  from nemo.core.optim.lr_scheduler import AVAILABLE_SCHEDULERS
  from nemo.core.optim.optimizers import AVAILABLE_OPTIMIZERS
  from nemo.utils import logging
label_desc: Use image node_id 1 to create a new OptCounter object from inherited base classes: torch.optim with example: obj = OptCounter()