code: def supports_caller(func):
      
  
      def wrap_stackframe(context, *args, **kwargs):
          context.caller_stack._push_frame()
          try:
              return func(context, *args, **kwargs)
          finally:
              context.caller_stack._pop_frame()
      return wrap_stackframe
docs: Apply a caller_stack compatibility decorator to a plain
      Python function.
  
      See the example in :ref:`namespaces_python_modules`.