from typing import List
from typing import Any
from typing import Optional


def paginate(
    items: List[Any], offset: int = 0, limit: Optional[int] = None
) -> List[Any]:
    """
    Mimic the behavior of database query's offset-limit pagination
    """
    end = limit + offset if limit is not None else None
    return items[offset:end]