docs: def counter_clockwise(cx, cy):
      """Put contour coordinates into counter-clockwise order
  
      Parameters
      ----------
      cx, cy: 1d ndarrays
          The x- and y-coordinates of the contour
  
      Returns
      -------
      cx_cc, cy_cc:
          The x- and y-coordinates of the contour in
          counter-clockwise orientation.
      """
      # test orientation
      angles = np.unwrap(np.arctan2(cy, cx))
      grad = np.gradient(angles)
      if np.average(grad) > 0:
          return cx[::-1], cy[::-1]
      else:
          return cx, cy