def METHOD_NAME(sample, base):
    h, t = base
    dists = np.dot(sample - h, np.dot(((0, -1), (1, 0)), (t - h)))
    outer = np.repeat(sample, dists > 0, axis=0)
    if len(outer):
        pivot = sample[np.argmax(dists)]
        return link(METHOD_NAME(outer, edge(h, pivot)),
            METHOD_NAME(outer, edge(pivot, t)))
    else:
        return base