def humanize_filesize(filesize: int) -> Tuple[str, str]:
    """Return human readable pair of size and unit from the given filesize in bytes."""
    for unit in ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z']:
        if filesize < 1024.0:
            return '{:3.1f}'.format(filesize), unit+'B'
        filesize /= 1024.0
def humanize_filesize ( filesize : int ) -> Tuple [ str , str ] : for unit in [ '' , 'K' , 'M' , 'G' , 'T' , 'P' , 'E' , 'Z' ] : if filesize < 1024.0 : return '{:3.1f}' . format ( filesize ) , unit + 'B' filesize /= 1024.0
Return human readable pair of size and unit from the given filesize in bytes.