code: def test_scan_unshared_params(self):
      x = random.normal(random.key(0), (1, 4))
      x = jnp.concatenate([x, x], 0)
      y, variables = init(mlp_scan)(
          random.key(1), x, share_params=False
      )
  
      param_shapes = unfreeze(
          jax.tree_util.tree_map(jnp.shape, variables["params"])
      )
      self.assertEqual(variables["counter"]["i"], 2)
      self.assertEqual(
          param_shapes,
          {
              "dense_0": {"kernel": (2, 4, 1), "bias": (2, 1)},
          },
      )
  
      self.assertNotEqual(y[0], y[1])
      k1, k2 = variables["params"]["dense_0"]["kernel"]
      self.assertFalse(jnp.allclose(k1, k2))
  
file_path: flax/tests/core/design/core_scan_test.py
imports: import jax
  from absl.testing import absltest
  from jax import numpy
  from jax import random
  from flax.core import Array, Scope, init, lift, nn, unfreeze
label_desc: Use image node_id 1 for calling the ScanTest obj's underlying member method code with example usage: obj.test_scan_unshared_params() without return types