import math


def distance(M, node_1, node_2):
    """Computes the Euclidean L2 Distance."""
    x1, y1 = M.intersections[node_1]
    x2, y2 = M.intersections[node_2]
    return math.sqrt(math.pow(x1 - x2, 2) + math.pow(y1 - y2, 2))