<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def human_file_size(size):
 """ Returns a human-friendly string representing a file size that is 2-4 characters long. For example, depending on the number of bytes given, can be one of:: 256b 64k 1.1G Parameters size : int The size of the file (in bytes) Returns ------- size : str A human-friendly representation of the size of the file """

    suffixes = ' kMGTPEZY'
    if size == 0:
        num_scale = 0
    else:
        num_scale = int(math.floor(math.log(size) / math.log(1000)))
    num_scale = max(num_scale, 0)
    if num_scale >= len(suffixes):
        suffix = '?'
    else:
        suffix = suffixes[num_scale]
    num_scale = int(math.pow(1000, num_scale))
    value = float(size) / num_scale
    str_value = str(value)
    if suffix == ' ':
        if '.' in str_value:
            str_value = str_value[:str_value.index('.')]
    elif str_value[2] == '.':
        str_value = str_value[:2]
    else:
        str_value = str_value[:3]
    return "{0:>3s}{1}".format(str_value, suffix)