#
#
from __future__ import annotations
from datetime import datetime
from typing import TYPE_CHECKING, Any, Iterable, Optional
from pydantic import BaseModel as BaseModelPydantic, PlainSerializer, PlainValidator
from typing_extensions import Annotated
from airflow.models import Operator
from airflow.models.baseoperator import BaseOperator
from airflow.serialization.pydantic.dag_run import DagRunPydantic
from airflow.utils.log.logging_mixin import LoggingMixin
from airflow.utils.session import NEW_SESSION, provide_session
from airflow.utils.xcom import XCOM_RETURN_KEY
if TYPE_CHECKING:
    import pendulum
    from pydantic_core.core_schema import ValidationInfo
    from sqlalchemy.orm import Session
    from airflow.models.dagrun import DagRun
    from airflow.models.taskinstance import TaskInstance
    from airflow.utils.context import Context
    from airflow.utils.state import DagRunState
def serialize_operator(x: Operator) -> dict: