<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def new_percent_saved(report_stats):
 """Spit out how much space the optimization saved."""

    size_in = report_stats.bytes_in
    if size_in > 0:
        size_out = report_stats.bytes_out
        ratio = size_out / size_in
        kb_saved = _humanize_bytes(size_in - size_out)
    else:
        ratio = 0
        kb_saved = 0
    percent_saved = (1 - ratio) * 100

    result = '{:.{prec}f}% ({})'.format(percent_saved, kb_saved, prec=2)
    return result