code: def _is_grad_equal(self, model_param_groups, master_param_groups):
      for u, v in zip(
          self._generate_params(model_param_groups),
          self._generate_params(master_param_groups),
      ):
          for m, n in zip(u.grad.data, v.grad.data):
              for x, y in zip(m, n):
                  self.assertEqual(x.float(), y.float())
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import copy
  import unittest
  import torch
  from pytext.optimizer import fp16_optimizer
  from torch.autograd import Variable
label_desc: Use image node_id 19 for calling the TestFp16Optimizer obj's underlying member method code with example usage: obj._is_grad_equal(model_param_groups, master_param_groups) without return types