code: def test_update_add_shared_error(self):
      class Bar(nnx.Module):
          def __init__(self) -> None:
              self.x = 1
  
      class Foo(nnx.Module):
          def __init__(self) -> None:
              self.a = Bar()
              self.b = self.a
  
          def add_submodule(self):
              self.c = self.a
  
      m1 = Foo()
      m2 = Foo()
      m2.add_submodule()
  
      assert hasattr(m2, "c")
  
      with pytest.raises(
          ValueError, match="Trying to add a new node at path"
      ):
          m1.update(m2)
  
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 25 for calling the TestModule obj's underlying member method code with example usage: obj.test_update_add_shared_error() without return types