def METHOD_NAME(x, y, threshold = 0.99):
    res = stats.linregress(x, y)
    print("R^2: " + str(res.rvalue**2))
    if res.rvalue**2 < threshold:
        sys.stderr.write("Distance matrix order failed!\n")
        sys.exit(1)