code: def test_shared_state_variables_not_shared_with_graph(self):
      class Foo(nnx.Module):
          def __init__(self):
              p = nnx.Param(1)
              self.a = p
              self.b = p
  
      m = Foo()
      state, static = m.split()
  
      assert isinstance(m.variables.a, nnx.Param)
      assert isinstance(m.variables.b, nnx.Param)
      assert isinstance(state.variables.a, nnx.Param)
      assert "b" not in state
      assert m.variables.a is not state.variables.a
      assert m.variables.b is not state.variables.a
      assert m.a == state.a
      assert m.b == state.a
  
      m2 = static.merge(state)
  
      assert isinstance(m2.variables.a, nnx.Param)
      assert isinstance(m2.variables.b, nnx.Param)
      assert isinstance(state.variables.a, nnx.Param)
      assert m2.variables.a is not state.variables.a
      assert m2.variables.b is not state.variables.a
      assert m2.a == state.a
      assert m2.b == state.a
      assert m2.a is m2.b
  
file_path: flax/flax/experimental/nnx/tests/test_graph_utils.py
imports: import jax
  import pytest
  from flax.experimental import nnx
label_desc: Use image node_id 14 for calling the TestGraphUtils obj's underlying member method code with example usage: obj.test_shared_state_variables_not_shared_with_graph() without return types