from datetime import datetime


def timestampms_to_datetime(timestamp):
    """Converts unix timestamp in milliseconds to datetime object.

    Keyword arguments:
    timestamp -- Timestamp to convert
    """
    if timestamp is None:
        return timestamp
    return datetime.fromtimestamp(timestamp / 1000)