code: def test_resume(self):
      new_optimizer = mock.Mock()
      new_extension = extensions.PolynomialShift(
          "x",
          self.rate,
          self.max_count,
          self.init,
          self.target,
          new_optimizer,
      )
  
      self.trainer.extend(self.extension)
      self.trainer.run()
  
      new_trainer = testing.get_trainer_with_mock_updater(
          (3, "iteration")
      )
      new_trainer.extend(new_extension)
      testing.save_and_load_npz(self.trainer, new_trainer)
  
      new_extension.initialize(new_trainer)
      self.assertEqual(new_optimizer.x, self.optimizer.x)
      self.assertIsInstance(new_optimizer.x, float)
  
file_path: chainer/tests/chainer_tests/training_tests/extensions_tests/test_polynomial_shift.py
imports: import unittest
  import mock
  from chainer import testing
  from chainer.training import extensions
  from chainer.training import util
label_desc: Use image node_id 6 for calling the TestPolynomialShift obj's underlying member method code with example usage: obj.test_resume() without return types