code: def testResourceCreatorNestingError(self):
      def creator(next_creator, *a, **kwargs):
          return next_creator(*a, **kwargs)
  
      # Save the state so we can clean up at the end.
      graph = ops.get_default_graph()
      old_creator_stack = graph._resource_creator_stack[
          "_DummyResource"
      ]
  
      try:
          scope = ops.resource_creator_scope(creator, "_DummyResource")
          scope.__enter__()
          with ops.resource_creator_scope(creator, "_DummyResource"):
              with self.assertRaises(RuntimeError):
                  scope.__exit__(None, None, None)
      finally:
          graph._resource_creator_stack[
              "_DummyResource"
          ] = old_creator_stack
  
imports: from tensorflow.python.eager import context
  from tensorflow.python.eager import wrap_function
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import test
  from tensorflow.python.trackable import resource
label_desc: Use image node_id 2 for calling the ResourceCreatorScopeTest obj's underlying member method code with example usage: obj.testResourceCreatorNestingError() and returns: next_creator