<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def closest_points(S):
 """Closest pair of points :param S: list of points :requires: size of S at least 2 :modifies: changes the order in S :returns: pair of points p,q from S with minimum Euclidean distance :complexity: expected linear time """

    shuffle(S)
    assert len(S) >= 2
    p = S[0]
    q = S[1]
    d = dist(p, q)
    while d > 0:
        r = improve(S, d)
        if r:
            d, p, q = r
        else:
            break
    return p, q