<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def canonicalize_edge(edge_data: EdgeData) -> Tuple[str, Optional[Tuple], Optional[Tuple]]: """Canonicalize the edge to a tuple based on the relation, subject modifications, and object modifications."""

    return (
        edge_data[RELATION],
        _canonicalize_edge_modifications(edge_data.get(SUBJECT)),
        _canonicalize_edge_modifications(edge_data.get(OBJECT)),
    )