def increment_error_count(self, invocation_id: str):
    """Increments the error count from the session state.

    Args:
      invocation_id: The invocation ID to increment the error count for.
    """
    if _ERROR_COUNT_KEY not in self._session_state:
      self._session_state[_ERROR_COUNT_KEY] = {}
    self._session_state[_ERROR_COUNT_KEY][invocation_id] = (
        self.get_error_count(invocation_id) + 1
    )
Increments the error count from the session state.

    Args:
      invocation_id: The invocation ID to increment the error count for.
    
src/google/adk/code_executors/code_executor_context.py