docs: def make_valid_pyclipper(shape):
      """
      Use the pyclipper library to "union" a polygon on its own. This operation
      uses the even-odd rule to determine which points are in the interior of
      the polygon, and can reconstruct the orientation of the polygon from that.
      The pyclipper library is robust, and uses integer coordinates, so should
      not produce any additional degeneracies.
  
      Before cleaning the polygon, we remove all degenerate inners. This is
      useful to remove inners which have collapsed to points or lines, which can
      interfere with the cleaning process.
      """
  
      # drop all degenerate inners
      clean_shape = _drop_degenerate_inners(shape)
  
      pc = pyclipper.Pyclipper()
  
      try:
          pc.AddPaths(_coords(clean_shape), pyclipper.PT_SUBJECT, True)
  
          # note: Execute2 returns the polygon tree, not the list of paths
          result = pc.Execute2(pyclipper.CT_UNION, pyclipper.PFT_EVENODD)
  
      except pyclipper.ClipperException:
          return MultiPolygon([])
  
      return _polytree_to_shapely(result)