code: def filesize(num_bytes):
      
      for prefix in '-KMGTEPZY':
          if num_bytes < 999.9:
              break
          num_bytes /= 1000.0
      if prefix == '-':
          return '{} B'.format(num_bytes)
      return '{:.3n} {}B'.format(num_bytes, prefix)
docs: Return a string containing an approximate representation of
      *num_bytes* using a small number and decimal SI prefix.