def lut_canonical_potential_edge(potential_edge):
    """Returns a canonical name of a potential edge, with respect to LUT height.

    Parameters
    ----------
    potential_edge : str
        Instantiated name of the potential edge to be canonicized.

    Returns
    -------
    str
        A canonical potential edge.
    """

    prefix, u, v = potential_edge.split("__")

    lut_span = int(v.split('_')[1]) - int(u.split('_')[1])
    if lut_span < 0:
        offset_str = "lutm%d_" % abs(lut_span)
    else:
        offset_str = "lutp%d_" % abs(lut_span)

    canonical = "__".join([prefix, '_'.join(u.split('_')[2:]),\
                offset_str + '_'.join(v.split('_')[2:])])

    return canonical