docs: def _normalize_edge(self, edge: EDGE) -> EDGE:
          """Gives unique representative of the edge.
  
          Two edges are equivalent if they form an edge between the same nodes.
          This method returns representative of this edge which can be compared
          using equality operator later.
  
          Args:
            edge: Edge to normalize.
  
          Returns:
            Normalized edge with lexicographically lower node on the first
            position.
          """
  
          def lower(n: GridQubit, m: GridQubit) -> bool:
              return n.row < m.row or (n.row == m.row and n.col < m.col)
  
          n1, n2 = edge
          return (n1, n2) if lower(n1, n2) else (n2, n1)