input: Write a python function to find the closest pair of points from a list of points.
  assert closest_pair_of_points([[2, 3], [12, 30], [40, 50], [5, 1], [12, 10], [3, 4]]) == (([2, 3], [3, 4]), 1.4142135623730951)
  assert closest_pair_of_points([[1, 1], [2, 2], [3, 3], [4, 4]]) == (([1, 1], [2, 2]), 1.4142135623730951)
  assert closest_pair_of_points([[0, 0], [1, 1], [1, 0], [0, 1]]) == (([0, 0], [1, 0]), 1.0)
output: def closest_pair_of_points(points):
      import math
  
      def distance(p1, p2):
          return math.sqrt((p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2)
  
      def closest_pair_recursive(px, py):
          if len(px) <= 3:
              min_dist = float('inf')
              min_pair = None
              for i in range(len(px)):
                  for j in range(i + 1, len(px)):
                      d = distance(px[i], px[j])
                      if d < min_dist:
                          min_dist = d
                          min_pair = (px[i], px[j])
              return min_pair, min_dist
          
          mid = len(px) // 2
          Qx = px[:mid]
          Rx = px[mid:]
          
          midpoint = px[mid][0]
          Qy = list(filter(lambda x: x[0] <= midpoint, py))
          Ry = list(filter(lambda x: x[0] > midpoint, py))
          
          (p1, q1), dist1 = closest_pair_recursive(Qx, Qy)
          (p2, q2), dist2 = closest_pair_recursive(Rx, Ry)
          
          if dist1 <= dist2:
              d = dist1
              min_pair = (p1, q1)
          else:
              d = dist2
              min_pair = (p2, q2)
          
          strip = [p for p in py if abs(p[0] - midpoint) < d]
          
          for i in range(len(strip)):
              for j in range(i + 1, min(i + 7, len(strip))):
                  p, q = strip[i], strip[j]
                  dst = distance(p, q)
                  if dst < d:
                      d = dst
                      min_pair = (p, q)
          
          return min_pair, d
      
      px = sorted(points, key=lambda x: x[0])
      py = sorted(points, key=lambda x: x[1])
      
      return closest_pair_recursive(px, py)