code: def testRegistry_NodeAndContextAssociations(self):
      reg = dsl_context_registry.get()
  
      n0 = _FakeNode()
      with _FakeContextManager() as c1:
          n1 = _FakeNode()
          with _FakeContextManager() as c2:
              n2 = _FakeNode()
              with _FakeContextManager() as c3:
                  n3 = _FakeNode()
          with _FakeContextManager() as c4:
              n4 = _FakeNode()
  
      # Associated nodes for each context
      self.assertEqual(reg.all_nodes, [n0, n1, n2, n3, n4])
      self.assertEqual(reg.get_nodes(c1), [n1, n2, n3, n4])
      self.assertEqual(reg.get_nodes(c2), [n2, n3])
      self.assertEqual(reg.get_nodes(c3), [n3])
      self.assertEqual(reg.get_nodes(c4), [n4])
      # Associated contexts for each node
      self.assertEqual(reg.all_contexts, [c1, c2, c3, c4])
      self.assertEqual(reg.get_contexts(n0), [])
      self.assertEqual(reg.get_contexts(n1), [c1])
      self.assertEqual(reg.get_contexts(n2), [c1, c2])
      self.assertEqual(reg.get_contexts(n3), [c1, c2, c3])
      self.assertEqual(reg.get_contexts(n4), [c1, c4])
  
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 6 for calling the ContextManagerTest obj's underlying member method code with example usage: obj.testRegistry_NodeAndContextAssociations() without return types