from datetime import datetime


def unix_ms_to_datetime(timestamp: int) -> datetime:
    """Convert a Unix millisecond timestamp to a Python ``datetime`` object.

    This is necessary as the timestamps Cook returns in its API are in
    milliseconds, while the Python ``datetime`` API uses seconds for Unix
    timestamps.
    """
    return datetime.fromtimestamp(timestamp / 1000)