from typing import Optional
from typing import List


def human_size(bytes: int | float, units: Optional[List[str]] = None) -> str:
    """
    Convert bytes into a more human-friendly format

    :param bytes: int
        Number of bytes
    :param units: Optional[List[str]]
        units used
    :return: str
        Return size in human friendly format: <number> <size_unit>
    """
    if units is None:
        units = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB']
    return f"{round(bytes, 2)} " + units[0] if bytes < 1024 else human_size(bytes / 1024, units[1:])