docs: def reducePrecision(element):
      """
      Because opacities, letter spacings, stroke widths and all that don't need
      to be preserved in SVG files with 9 digits of precision.
  
      Takes all of these attributes, in the given element node and its children,
      and reduces their precision to the current Decimal context's precision.
      Also checks for the attributes actually being lengths, not 'inherit', 'none'
      or anything that isn't an SVGLength.
  
      Returns the number of bytes saved after performing these reductions.
      """
      num = 0
  
      styles = _getStyle(element)
      for lengthAttr in ['opacity', 'flood-opacity', 'fill-opacity',
                         'stroke-opacity', 'stop-opacity', 'stroke-miterlimit',
                         'stroke-dashoffset', 'letter-spacing', 'word-spacing',
                         'kerning', 'font-size-adjust', 'font-size',
                         'stroke-width']:
          val = element.getAttribute(lengthAttr)
          if val != '':
              valLen = SVGLength(val)
              if valLen.units != Unit.INVALID:  # not an absolute/relative size or inherit, can be % though
                  newVal = scourLength(val)
                  if len(newVal) < len(val):
                      num += len(val) - len(newVal)
                      element.setAttribute(lengthAttr, newVal)
          # repeat for attributes hidden in styles
          if lengthAttr in styles:
              val = styles[lengthAttr]
              valLen = SVGLength(val)
              if valLen.units != Unit.INVALID:
                  newVal = scourLength(val)
                  if len(newVal) < len(val):
                      num += len(val) - len(newVal)
                      styles[lengthAttr] = newVal
      _setStyle(element, styles)
  
      for child in element.childNodes:
          if child.nodeType == Node.ELEMENT_NODE:
              num += reducePrecision(child)
  
      return num