def humanize_bitrate(bitrate):
    """Humanize bitrate from integer."""
    if bitrate is not None:
        for divisor, symbol in [(1000 ** 1, 'Kbps'), (1, 'bps')]:
            if bitrate >= divisor:
                break
        return f'{round(bitrate / divisor)} {symbol}'
