code: def test_complex_decorator(self):
      scan_over_layers = partial(
          nnx.scan,
          variable_axes={nnx.Param: 0},
          length=5,
      )
  
      class Block(nnx.Module):
          @scan_over_layers
          def __init__(self, *, rngs: nnx.Rngs):
              self.d = 3
              self.linear = nnx.Linear(3, 3, rngs=rngs)
              self.bn = nnx.BatchNorm(3, rngs=rngs)
              self.dropout = nnx.Dropout(0.5)
              self.node = nnx.Variable(jnp.ones((2,)))
  
          @scan_over_layers
          def __call__(
              self, x: jax.Array, _, *, rngs: nnx.Rngs
          ) -> tp.Tuple[jax.Array, None]:
              x = self.linear(x)
              x = self.bn(x)
              x = self.dropout(x, rngs=rngs)
              x = nnx.gelu(x)
              return x, None
  
      module = Block(rngs=nnx.Rngs(0))
  
      assert module.d == 3
      assert module.linear.kernel.shape == (5, 3, 3)
      assert module.linear.bias.shape == (5, 3)
      assert module.node.shape == (2,)
  
      x = jnp.ones((1, 3))
      with nnx.flags(deterministic=False, use_running_average=False):
          y, out = module(x, None, rngs=nnx.Rngs(dropout=1))
  
      assert y.shape == (1, 3)
      assert out is None
  
imports: import typing
  from functools import partial
  import jax
  import jax.numpy
  import pytest
  from flax.experimental import nnx
label_desc: Use image node_id 8 for calling the TestScan obj's underlying member method code with example usage: obj.test_complex_decorator() and returns: x,  None