class_docstr: Catches recursions of executions.
class_docstr_tok: ["Catches","recursions","of","executions","."]
code: def push_execution(self, execution):
      funcdef = execution.tree_node
  
      # These two will be undone in pop_execution.
      self._recursion_level += 1
      self._parent_execution_funcs.append(funcdef)
  
      module = execution.get_root_context()
      if module == self._evaluator.builtins_module:
          # We have control over builtins so we know they are not recursing
          # like crazy. Therefore we just let them execute always, because
          # they usually just help a lot with getting good results.
          return False
  
      if self._recursion_level > recursion_limit:
          return True
  
      if self._execution_count >= total_function_execution_limit:
          return True
      self._execution_count += 1
  
      if (
          self._funcdef_execution_counts.setdefault(funcdef, 0)
          >= per_function_execution_limit
      ):
          return True
      self._funcdef_execution_counts[funcdef] += 1
  
      if (
          self._parent_execution_funcs.count(funcdef)
          > per_function_recursion_limit
      ):
          return True
      return False
  
file_path: catboost/contrib/python/jedi/py2/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 3 for calling the ExecutionRecursionDetector obj's underlying member method code with example usage: obj.push_execution(execution) and returns: False, False, True, True, True, True