https://github.com/apache/airflow/blob/main/airflow/cli/commands/task_command.py#L145
"""Is task instance is eligible for retry."""
        from airflow.models.taskinstance import _is_eligible_to_retry
        return _is_eligible_to_retry(task_instance=self)
    @provide_session
    def handle_failure(
        self,
        error: None | str | Exception | KeyboardInterrupt,
        test_mode: bool | None = None,
        context: Context | None = None,
        force_fail: bool = False,
        session: Session = NEW_SESSION,
    ) -> None:
        """
        Handle Failure for a task instance.
        :param error: if specified, log the specific exception if thrown
        :param session: SQLAlchemy ORM Session
        :param test_mode: doesn't record success or failure in the DB if True
        :param context: Jinja2 context
        :param force_fail: if True, task does not retry
        """
        from airflow.models.taskinstance import _handle_failure
        _handle_failure(
            task_instance=self,
            error=error,
            session=session,
            test_mode=test_mode,
            context=context,
            force_fail=force_fail,
        )
    def refresh_from_task(self, task: Operator, pool_override: str | None = None) -> None: