from typing import List
from typing import Any


def lazy_content(__list: List, /, nvals: int, ellipsis: Any = ...) -> List:
    """Return list at most {nvals} items from object

    Extra values are replaced with mid_value

    Examples:
        >>> lazy_content([1, 2, 3, 4, 5], 3)
        ... [1, ..., 5]
    """
    if len(__list) <= nvals:
        return __list
    return (
        __list[: nvals // 2] + [ellipsis] + __list[len(__list) - abs(nvals - 1) // 2:]
    )