code: def execution_recursion_decorator(default=NO_CONTEXTS):
      def decorator(func):
          def wrapper(self, **kwargs):
              detector = self.evaluator.execution_recursion_detector
              allowed = detector.push_execution(self)
              try:
                  if allowed:
                      result = default
                  else:
                      result = func(self, **kwargs)
              finally:
                  detector.pop_execution()
              return result
  
          return wrapper
  
      return decorator
  
file_path: catboost/contrib/python/jedi/py3/jedi/evaluate/recursion.py
imports: from contextlib import contextmanager
  from jedi import debug
  from jedi.evaluate.base_context import NO_CONTEXTS
label_desc: Use image node_id 2 for calling a global function with example usage: execution_recursion_decorator(default) and returns: decorator, wrapper, result