"""
        Copy common attributes from the given task.
        :param task: The task object to copy from
        :param pool_override: Use the pool_override instead of task's pool
        """
        from airflow.models.taskinstance import _refresh_from_task
        _refresh_from_task(task_instance=self, task=task, pool_override=pool_override)
    @provide_session
    def get_previous_dagrun(
        self,
        state: DagRunState | None = None,
        session: Session | None = None,
    ) -> DagRun | None:
        """
        Return the DagRun that ran before this task instance's DagRun.
        :param state: If passed, it only take into account instances of a specific state.
        :param session: SQLAlchemy ORM Session.
        """
        from airflow.models.taskinstance import _get_previous_dagrun
        return _get_previous_dagrun(task_instance=self, state=state, session=session)
    @provide_session
    def get_previous_execution_date(