"""Stringifies DAGs and operators contained by var and returns a dict of var."""
        json_dict = {"__version": cls.SERIALIZER_VERSION, "dag": cls.serialize_dag(var)}
        
        cls.validate_schema(json_dict)
        return json_dict
    @classmethod
    def from_dict(cls, serialized_obj: dict) -> SerializedDAG:
        """Deserializes a python dict in to the DAG and operators it contains."""
        ver = serialized_obj.get("__version", "<not present>")
        if ver != cls.SERIALIZER_VERSION:
            raise ValueError(f"Unsure how to deserialize version {ver!r}")
        return cls.deserialize_dag(serialized_obj["dag"])
class TaskGroupSerialization(BaseSerialization):
    """JSON serializable representation of a task group."""
    @classmethod
    def serialize_task_group(cls, task_group: TaskGroup) -> dict[str, Any] | None: