def humanize_bytes(num_bytes):
    """
    Convert a number of bytes to human version
    :param num_bytes: int: bytes to be converted to
    :return: str
    """
    val = num_bytes
    suffix = 'B'
    if val >= 1024:
        val = val / 1024
        suffix = 'KiB'
    if val >= 1024:
        val = val / 1024
        suffix = 'MiB'
    if val >= 1024:
        val = val / 1024
        suffix = 'GiB'
    val = '{:0.1f} {}'.format(val, suffix)
    return val.replace('.0', '')
