code: def zero_grad(self, models, optimizer, how_to_zero):
      if how_to_zero == "none":
          for model in models:
              for param in model.parameters():
                  param.grad = None
      elif how_to_zero == "model":
          for model in models:
              model.zero_grad()
      elif how_to_zero == "optimizer":
          optimizer.zero_grad()
  
imports: import unittest
  import functools
  import itertools
  from apex import amp
  from apex.amp import _amp_state
  import torch
  from torch import nn
  import torch.nn.functional
  from torch.nn import Parameter
  from utils import common_init, HALF, FLOAT, ALWAYS_HALF, ALWAYS_FLOAT, MATCH_INPUT
label_desc: Use image node_id 3 for calling the TestAddParamGroup obj's underlying member method code with example usage: obj.zero_grad(models, optimizer, how_to_zero) without return types