def sizeof_fmt(num, suffix='B', standard='SI'):
    """Humanized size modified from link below
    Link: https://stackoverflow.com/questions/1094841/reusable-library-to-get-human-readable-version-of-file-size#1094933
    """
    if standard.lower() == 'si':
        unit_list = ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z']
        last_unit_value = 'Y'
        divisor = 1000.0
    elif standard.lower() == 'iec':
        unit_list = ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi']
        last_unit_value = 'Yi'
        divisor = 1024.0
    else:
        raise NotImplementedError('Unknow `standard`')
    for unit in unit_list:
        if abs(num) < 1024.0:
            return '{:3.2f} {}{}'.format(num, unit, suffix)
        num /= divisor
    return '{:.2f} {}{}'.format(num, last_unit_value, suffix)
