docs: 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)),
      )