code: def test_basic(self):
      @nnx.dataclass
      class Foo(nnx.Module):
          a: int
          b: int = nnx.treenode_field()
          c: int = nnx.param_field()
          d: int = nnx.variable_field(nnx.BatchStat)
          e: int
          f: int
  
      m = Foo(
          a=1,  # static
          b=2,  # node
          c=3,  # param
          d=4,  # var
          e=5,  # static int
          f=nnx.Variable(6),  # test that we can pass in a node
      )
  
      state, graphdef = m.split()
  
      assert len(state) == 4
      assert state.variables.b == nnx.TreeNode(2)
      assert state.variables.c == nnx.Param(3)
      assert state.variables.d == nnx.BatchStat(4)
      assert state.variables.f == nnx.Variable(6)
  
imports: import dataclasses
  from copy import deepcopy
  from typing import Any, TypeVar
  import jax
  import jax.numpy
  import pytest
  from flax.experimental import nnx
label_desc: Use image node_id 1 for calling the TestModuleDataclass obj's underlying member method code with example usage: obj.test_basic() without return types