input: Write a python function to implement the Cohen-Sutherland line clipping algorithm.
  assert cohen_sutherland_clipping(5, 5, 7, 7, (1, 1, 10, 10)) == (5, 5, 7, 7)
  assert cohen_sutherland_clipping(0, 0, 15, 15, (1, 1, 10, 10)) == (1, 1, 10, 10)
  assert cohen_sutherland_clipping(5, 5, 15, 15, (1, 1, 10, 10)) == (5, 5, 10, 10)
  assert cohen_sutherland_clipping(0, 0, 1, 1, (2, 2, 10, 10)) == False
output: def cohen_sutherland_clipping(x1, y1, x2, y2, rect):
      INSIDE = 0  # 0000
      LEFT = 1    # 0001
      RIGHT = 2   # 0010
      BOTTOM = 4  # 0100
      TOP = 8     # 1000
  
      xmin, ymin, xmax, ymax = rect
  
      def compute_out_code(x, y):
          code = INSIDE
          if x < xmin:
              code |= LEFT
          elif x > xmax:
              code |= RIGHT
          if y < ymin:
              code |= BOTTOM
          elif y > ymax:
              code |= TOP
          return code
  
      outcode1 = compute_out_code(x1, y1)
      outcode2 = compute_out_code(x2, y2)
      accept = False
  
      while True:
          if not (outcode1 | outcode2):
              accept = True
              break
          elif outcode1 & outcode2:
              break
          else:
              x = 0.0
              y = 0.0
              outcode_out = outcode1 if outcode1 != INSIDE else outcode2
              if outcode_out & TOP:
                  x = x1 + (x2 - x1) * (ymax - y1) / (y2 - y1)
                  y = ymax
              elif outcode_out & BOTTOM:
                  x = x1 + (x2 - x1) * (ymin - y1) / (y2 - y1)
                  y = ymin
              elif outcode_out & RIGHT:
                  y = y1 + (y2 - y1) * (xmax - x1) / (x2 - x1)
                  x = xmax
              elif outcode_out & LEFT:
                  y = y1 + (y2 - y1) * (xmin - x1) / (x2 - x1)
                  x = xmin
  
              if outcode_out == outcode1:
                  x1, y1 = x, y
                  outcode1 = compute_out_code(x1, y1)
              else:
                  x2, y2 = x, y
                  outcode2 = compute_out_code(x2, y2)
  
      if accept:
          return (x1, y1, x2, y2)
      else:
          return False