<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def float_str(value, symbol_str="", symbol_value=1, after=False, max_denominator=1000000):
 """ Pretty rational string from float numbers. Converts a given numeric value to a string based on rational fractions of the given symbol, useful for labels in plots. Parameters value : A float number or an iterable with floats. symbol_str : String data that will be in the output representing the data as a numerator multiplier, if needed. Defaults to an empty string. symbol_value : to one (no effect). after : Chooses the place where the ``symbol_str`` should be written. If ``True``, that's the end of the string. If ``False``, that's in between the numerator and the denominator, before the slash. Defaults to ``False``. max_denominator : An int instance, used to round the float following the given limit. Defaults to the integer 1,000,000 (one million). Returns ------- A string with the rational number written into as a fraction, with or without a multiplying symbol. Examples -------- '25/2' '1/3' '333/1000' '1/3' 'steps/8' '1/8 Hz' See Also -------- float_str.pi : This fraction/ratio formatter, but configured with the "pi" symbol. """

  if value == 0:
    return "0"

  frac = Fraction(value/symbol_value).limit_denominator(max_denominator)
  num, den = frac.numerator, frac.denominator

  output_data = []

  if num < 0:
    num = -num
    output_data.append("-")

  if (num != 1) or (symbol_str == "") or after:
    output_data.append(str(num))

  if (value != 0) and not after:
    output_data.append(symbol_str)

  if den != 1:
    output_data.extend(["/", str(den)])

  if after:
    output_data.append(symbol_str)

  return "".join(output_data)