def generate_human_readable_size(byte_size: int) -> str:
    """Generate a human readable size from a byte size.

    Returns a human readable string with the size converted in one of the multiple of the byte
    according to the standards defined by the International Electrotechnical Commission (IEC) in
    1998. Available multiples are kibibytes (1024 bytes, KiB), mibibytes (1024^2 bytes, MiB),
    gibibytes (1024^3 bytes, GiB) and tibibytes (1024^4 bytes, TiB).

    Parameters
    ----------
    byte_size: int
        The size in bytes to convert.

    Returns
    -------
    str
        The converted byte size, followed by the right suffix.

    """
    size_measurement_units = (('KiB', 1024), ('MiB', 1024**2), ('GiB', 1024**3), ('TiB', 1024**4))
    suffix = None
    divisor = None
    for u, m in size_measurement_units:
        if byte_size >= m:
            suffix = u
            divisor = m

    if suffix and divisor:
        return f'{round(byte_size / divisor, 1)} {suffix}'
    return f'{byte_size}B'
    # return f'{round(byte_size/divisor, 1)} {suffix}'