docs: def reduce_value(cls, value):
      """Cleans the value by either compressing it if it is a string, or reducing it if it is a
      number.
      """
      if isinstance(value, str):
        return to_compressed_string(value)
      elif isinstance(value, bool):
        return value
      elif isinstance(value, Number):
        return reduce_number(value)
      else:
        return value