<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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