code: def testNewRegistry_InnerRegistryIsolated(self):
      outer = dsl_context_registry.get()
  
      n0 = _FakeNode()
      with _FakeContextManager() as c1:
          n1 = _FakeNode()
          with dsl_context_registry.new_registry() as inner:
              n2 = _FakeNode()
              with _FakeContextManager() as c2:
                  n3 = _FakeNode()
  
      self.assertEqual(outer.all_nodes, [n0, n1])
      self.assertEqual(inner.all_nodes, [n2, n3])
      self.assertEqual(outer.get_nodes(c1), [n1])
      self.assertEqual(inner.get_nodes(c2), [n3])
      self.assertEqual(outer.get_contexts(n0), [])
      self.assertEqual(outer.get_contexts(n1), [c1])
      self.assertEqual(inner.get_contexts(n2), [])
      self.assertEqual(inner.get_contexts(n3), [c2])
  
      for reg, node in [
          (inner, n0),
          (inner, n1),
          (outer, n2),
          (outer, n3),
      ]:
          with self.assertRaisesRegex(
              ValueError, "does not exist in the registry"
          ):
              reg.get_contexts(node)
  
      for reg, context in [(inner, c1), (outer, c2)]:
          with self.assertRaisesRegex(
              ValueError, "does not exist in the registry"
          ):
              reg.get_nodes(context)
  
imports: from typing import Dict, Any
  import tensorflow
  from tfx.dsl.components.base import base_node
  from tfx.dsl.context_managers import dsl_context
  from tfx.dsl.context_managers import dsl_context_manager
  from tfx.dsl.context_managers import dsl_context_registry
  from tfx.utils import test_case_utils
label_desc: Use image node_id 9 for calling the ContextManagerTest obj's underlying member method code with example usage: obj.testNewRegistry_InnerRegistryIsolated() without return types