docstr: Test variable hierarchy.
docstr_tok: ["Test","variable","hierarchy","."]
code: def test_var_hierarchy(self):
      """Test variable hierarchy."""
      t = objax.TrainVar(jn.zeros(2))
      s = objax.StateVar(jn.zeros(2))
      r = objax.TrainRef(t)
      x = objax.RandomState(0)
      self.assertIsInstance(t, objax.TrainVar)
      self.assertIsInstance(t, objax.BaseVar)
      self.assertNotIsInstance(t, objax.BaseState)
      self.assertIsInstance(s, objax.BaseVar)
      self.assertIsInstance(s, objax.BaseState)
      self.assertNotIsInstance(s, objax.TrainVar)
      self.assertIsInstance(r, objax.BaseVar)
      self.assertIsInstance(r, objax.BaseState)
      self.assertNotIsInstance(r, objax.TrainVar)
      self.assertIsInstance(x, objax.BaseVar)
      self.assertIsInstance(x, objax.BaseState)
      self.assertIsInstance(x, objax.StateVar)
      self.assertNotIsInstance(x, objax.TrainVar)
  
imports: import unittest
  import numpy
  import jax.numpy
  import objax
label_desc: Use image node_id 6 for calling the TestVariable obj's underlying member method code with example usage: obj.test_var_hierarchy() without return types