docstr: Test Custom StateVar reducing.
docstr_tok: ["Test","Custom","StateVar","reducing","."]
code: def test_state_var_custom_reduce(self):
      """Test Custom StateVar reducing."""
      array = jn.array([[0, 4, 2], [3, 1, 5]], dtype=jn.float32)
      v = objax.StateVar(array, reduce=lambda x: x[0])
      v.reduce(v.value)
      self.assertEqual(v.value.tolist(), [0, 4, 2])
      v = objax.StateVar(array, reduce=lambda x: x.min(0))
      v.reduce(v.value)
      self.assertEqual(v.value.tolist(), [0, 1, 2])
      v = objax.StateVar(array, reduce=lambda x: x.max(0))
      v.reduce(v.value)
      self.assertEqual(v.value.tolist(), [3, 4, 5])
  
imports: import unittest
  import numpy
  import jax.numpy
  import objax
label_desc: Use image node_id 5 for calling the TestVariable obj's underlying member method code with example usage: obj.test_state_var_custom_reduce() without return types