code: def human_file_size(size):
      
      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)
docs: 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