class_docstr: Unit tests for classes from module.py.
class_docstr_tok: ["Unit","tests","for","classes","from","module.py","."]
code: def test_auto_vars_decorator(self):
      m = ComplexModule(2)
  
      @objax.Function.auto_vars
      def my_func(
          x: JaxArray, y: JaxArray, *, named: int = 1
      ) -> Tuple[JaxArray, JaxArray]:
          return (
              m(x, training=True) - named,
              m(y, training=False) + named,
          )
  
      self.assertEqual(my_func.vars(), m.vars("{my_func}m."))
      self.assertEqual(
          inspect.signature(my_func),
          inspect.Signature(
              [
                  inspect.Parameter(
                      "x",
                      inspect.Parameter.POSITIONAL_OR_KEYWORD,
                      annotation=JaxArray,
                  ),
                  inspect.Parameter(
                      "y",
                      inspect.Parameter.POSITIONAL_OR_KEYWORD,
                      annotation=JaxArray,
                  ),
                  inspect.Parameter(
                      "named",
                      inspect.Parameter.KEYWORD_ONLY,
                      annotation=int,
                      default=1,
                  ),
              ],
              return_annotation=Tuple[JaxArray, JaxArray],
          ),
      )
  
imports: import functools
  import inspect
  import unittest
  from typing import Tuple
  import numpy
  from jax import numpy
  import objax
  from objax.typing import JaxArray
label_desc: Use image node_id 5 for calling the TestModule obj's underlying member method code with example usage: obj.test_auto_vars_decorator() and returns: unknown,  unknown