def size(edge):
    """
    The size of the edge
    Args:
        edge: two points defining an edge

    Returns: length^2 of a vector

    """
    p_1 = edge[0]
    p_2 = edge[1]
    x = p_1[0] - p_2[0]
    y = p_1[1] - p_2[1]
    return x**2 + y**2

    The size of the edge
    Args:
        edge: two points defining an edge

    Returns: length^2 of a vector

    
metadrive/utils/shapely_utils/geom.py