task.task_group = weakref.proxy(group)
            return task
        group.children = {
            label: set_ref(task_dict[val])
            if _type == DAT.OP
            else cls.deserialize_task_group(val, group, task_dict, dag=dag)
            for label, (_type, val) in encoded_group["children"].items()
        }
        group.upstream_group_ids.update(cls.deserialize(encoded_group["upstream_group_ids"]))
        group.downstream_group_ids.update(cls.deserialize(encoded_group["downstream_group_ids"]))
        group.upstream_task_ids.update(cls.deserialize(encoded_group["upstream_task_ids"]))
        group.downstream_task_ids.update(cls.deserialize(encoded_group["downstream_task_ids"]))
        return group
@dataclass(frozen=True)
class DagDependency:
    """Dataclass for representing dependencies between DAGs.
    These are calculated during serialization and attached to serialized DAGs.
    """
    source: str
    target: str
    dependency_type: str
    dependency_id: str | None = None
    @property
    def node_id(self):