docs: def remove_overlaps(self, ufos, glyph_filter=lambda g: len(g)):
          """Remove overlaps in UFOs' glyphs' contours."""
          from booleanOperations import union, BooleanOperationsError
  
          for ufo in ufos:
              font_name = self._font_name(ufo)
              logger.info("Removing overlaps for " + font_name)
              for glyph in ufo:
                  if not glyph_filter(glyph):
                      continue
                  contours = list(glyph)
                  glyph.clearContours()
                  try:
                      union(contours, glyph.getPointPen())
                  except BooleanOperationsError:
                      logger.error(
                          "Failed to remove overlaps for %s: %r", font_name, glyph.name
                      )
                      raise