Used by Variable/Connection.

https://github.com/apache/airflow/blob/894741e311ffd642e036b80d3b1b5d53c3747cad/airflow/secrets/metastore.py#L32

elif type_ == DAT.TUPLE:
            return tuple(cls.deserialize(v, use_pydantic_models) for v in var)
        elif type_ == DAT.PARAM:
            return cls._deserialize_param(var)
        elif type_ == DAT.XCOM_REF:
            return _XComRef(var)  
        elif type_ == DAT.DATASET:
            return Dataset(**var)
        elif type_ == DAT.SIMPLE_TASK_INSTANCE:
            return SimpleTaskInstance(**cls.deserialize(var))
        elif use_pydantic_models and _ENABLE_AIP_44:
            if type_ == DAT.BASE_JOB:
                return JobPydantic.parse_obj(var)
            elif type_ == DAT.TASK_INSTANCE:
                return TaskInstancePydantic.parse_obj(var)
            elif type_ == DAT.DAG_RUN:
                return DagRunPydantic.parse_obj(var)
            elif type_ == DAT.DATA_SET:
                return DatasetPydantic.parse_obj(var)
        elif type_ == DAT.ARG_NOT_SET:
            return NOTSET
        else:
            raise TypeError(f"Invalid type {type_!s} in deserialization.")
    _deserialize_datetime = pendulum.from_timestamp
    _deserialize_timezone = pendulum.tz.timezone
    @classmethod
    def _deserialize_timedelta(cls, seconds: int) -> datetime.timedelta:
        return datetime.timedelta(seconds=seconds)
    @classmethod
    def _is_constructor_param(cls, attrname: str, instance: Any) -> bool: