code: def test_master_maintain_logic(self):
      self._test_logic_prepare()
      cpu_sum_base = []
      for p in self._generate_params(self.optimizer.param_groups):
          cpu_sum_base_init = float(p.data.float().sum())
          cpu_sum_base.append(cpu_sum_base_init)
      self._test_master_maintain_logic_baseline()
      for p in self._generate_params(self.optimizer.param_groups):
          cpu_sum_base_final = float(p.data.float().sum())
          cpu_sum_base.append(cpu_sum_base_final)
  
      cpu_sum_exp = []
      for p in self._generate_params(self.ffp16_optim.param_groups):
          cpu_sum_exp_init = float(p.data.float().sum())
          cpu_sum_exp.append(cpu_sum_exp_init)
      self._test_master_maintain_logic_experiment()
      for p in self._generate_params(self.ffp16_optim.param_groups):
          cpu_sum_exp_final = float(p.data.float().sum())
          cpu_sum_exp.append(cpu_sum_exp_final)
  
      print(cpu_sum_base, cpu_sum_exp)
      for i, j in zip(cpu_sum_base, cpu_sum_exp):
          self.assertEqual(i, j)
  
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 10 for calling the TestFp16Optimizer obj's underlying member method code with example usage: obj.test_master_maintain_logic() without return types