code: def test_real_case(self):
      class MyModel(objax.Module):
          def __init__(self):
              self.model = wide_resnet.WideResNet(
                  3, 10, depth=28, width=2
              )
              self.opt = objax.optimizer.Momentum(self.model.vars())
              self.ema = objax.optimizer.ExponentialMovingAverage(
                  self.model.vars(), momentum=0.999
              )
  
      m1 = MyModel()
      m2 = MyModel()
      with io.BytesIO() as f:
          objax.io.save_var_collection(f, m1.vars())
          f.seek(0)
          objax.io.load_var_collection(f, m2.vars())
  
      v2 = m2.vars()
      for k, v in m1.vars().items():
          self.assertEqual(
              v.value.tolist(),
              v2[k].value.tolist(),
              msg=f"Variable {k} value is differing.",
          )
  
file_path: objax/tests/testio.py
imports: import io
  import tempfile
  import unittest
  import jax.numpy
  import objax
  from objax.zoo import wide_resnet
label_desc: Use image node_id 4 for calling the TestIO obj's underlying member method code with example usage: obj.test_real_case() without return types