code: def closest_points(S):
      
      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
docs: 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