Used by Variable/Connection.

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

"""Serialize Params dict for a DAG or task."""
        serialized_params = {}
        for k, v in params.items():
            
            try:
                class_identity = f"{v.__module__}.{v.__class__.__name__}"
            except AttributeError:
                class_identity = ""
            if class_identity == "airflow.models.param.Param":
                serialized_params[k] = cls._serialize_param(v)
            else:
                raise ValueError(
                    f"Params to a DAG or a Task can be only of type airflow.models.param.Param, "
                    f"but param {k!r} is {v.__class__}"
                )
        return serialized_params
    @classmethod
    def _deserialize_params_dict(cls, encoded_params: dict) -> ParamsDict:
        """Deserialize a DAG's Params dict."""
        op_params = {}
        for k, v in encoded_params.items():
            if isinstance(v, dict) and "__class" in v:
                op_params[k] = cls._deserialize_param(v)
            else:
                
                op_params[k] = Param(v)
        return ParamsDict(op_params)
class DependencyDetector: