def METHOD_NAME(xy):
    METHOD_NAME = np.linalg.norm(xy[0] - xy[-1])
    for i in prange(xy.shape[0] - 1):
        p = np.linalg.norm(xy[i] - xy[i + 1])
        METHOD_NAME += p
    return METHOD_NAME