def format_bytes(size):
    """
    human readable bytes size
    :param size: integer
    :return: string
    """
    power = 2 ** 10
    n = 0
    power_labels = {(0): 'B', (1): 'kB', (2): 'MB', (3): 'GB', (4): 'TB'}
    while size > power:
        size /= power
        n += 1
    if n:
        formatted_size = f'{size:.2f}'
    else:
        formatted_size = size
    return f'{formatted_size}{power_labels[n]}'
