code: def test_file_load_save_references(self):
      a = objax.nn.Conv2D(16, 16, 3)
      b = objax.nn.Conv2D(16, 16, 3)
      c = objax.nn.Conv2D(16, 16, 3)
      refs = objax.ModuleList([objax.TrainRef(a.w)])
      crefs = objax.ModuleList([objax.TrainRef(c.w)])
      self.assertFalse(jn.array_equal(a.w.value, b.w.value))
      with io.BytesIO() as f:
          objax.io.save_var_collection(f, a.vars())
          size = f.tell()
          f.seek(0)
          objax.io.save_var_collection(f, a.vars() + refs.vars())
          self.assertEqual(size, f.tell())
          f.seek(0)
          objax.io.load_var_collection(f, b.vars())
          f.seek(0)
          with self.assertRaises(ValueError):
              objax.io.load_var_collection(f, refs.vars() + c.vars())
          f.seek(0)
          objax.io.load_var_collection(f, crefs.vars() + c.vars())
      self.assertEqual(a.w.value.dtype, b.w.value.dtype)
      self.assertEqual(a.w.value.dtype, c.w.value.dtype)
      self.assertTrue(jn.array_equal(a.w.value, b.w.value))
      self.assertTrue(jn.array_equal(a.w.value, c.w.value))
  
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 3 for calling the TestIO obj's underlying member method code with example usage: obj.test_file_load_save_references() without return types