code: def testContext_ParentAttrFactory(self):
      with _FakeContextManager() as c1:
          self.assertIsNone(c1.parent)
          with _FakeContextManager() as c2:
              self.assertIs(c2.parent, c1)
              with _FakeContextManager() as c3:
                  self.assertEqual(c3.parent, c2)
          with _FakeContextManager() as c4:
              self.assertIs(c4.parent, c1)
  
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 2 for calling the ContextManagerTest obj's underlying member method code with example usage: obj.testContext_ParentAttrFactory() without return types