code: def test_vars(self):
      t = objax.TrainVar(jn.zeros([1, 2, 3, 2, 1]))
      tv = "\n".join(
          [
              "objax.TrainVar(Array([[[[[0.],",
              "          [0.]],",
              "         [[0.],",
              "          [0.]],",
              "         [[0.],",
              "          [0.]]],",
              "        [[[0.],",
              "          [0.]],",
              "         [[0.],",
              "          [0.]],",
              "         [[0.],",
              "          [0.]]]]], dtype=float32), reduce=reduce_mean)",
          ]
      )
      self.assertEqual(repr(t), tv)
      r = objax.TrainRef(t)
      rv = "\n".join(
          [
              "objax.TrainRef(ref=objax.TrainVar(Array([[[[[0.],",
              "          [0.]],",
              "         [[0.],",
              "          [0.]],",
              "         [[0.],",
              "          [0.]]],",
              "        [[[0.],",
              "          [0.]],",
              "         [[0.],",
              "          [0.]],",
              "         [[0.],",
              "          [0.]]]]], dtype=float32), reduce=reduce_mean))",
          ]
      )
      self.assertEqual(repr(r), rv)
      t = objax.StateVar(jn.zeros([1, 2, 3, 2, 1]))
      tv = "\n".join(
          [
              "objax.StateVar(Array([[[[[0.],",
              "          [0.]],",
              "         [[0.],",
              "          [0.]],",
              "         [[0.],",
              "          [0.]]],",
              "        [[[0.],",
              "          [0.]],",
              "         [[0.],",
              "          [0.]],",
              "         [[0.],",
              "          [0.]]]]], dtype=float32), reduce=reduce_mean)",
          ]
      )
      self.assertEqual(repr(t), tv)
      self.assertEqual(
          repr(objax.random.Generator().key),
          "objax.RandomState(Array([0, 0], dtype=uint32))",
      )
  
file_path: objax/tests/repr.py
imports: import functools
  import unittest
  import jax.numpy
  import objax
label_desc: Use image node_id 2 for calling the TestRepr obj's underlying member method code with example usage: obj.test_vars() without return types