from typing import Optional


def TimeInterval(start: int, end: Optional[int] = None):
    """Get a timestamp interval for the given parameters.

    Mainly used for test purposes.

    Parameters
    ----------
    start: int
        First version in the interval.
    end: int, optional
        Last version (inclusive) in the interval.
    """
    return start if end is None else [start, end]