from datetime import datetime


def epoch_to_iso(ms_passed_since_epoch):
    """
    Converts epoch (miliseconds) to ISO string
    """
    if isinstance(ms_passed_since_epoch, int) and ms_passed_since_epoch >= 0:
        return datetime.utcfromtimestamp(ms_passed_since_epoch / 1000.0).strftime(
            "%Y-%m-%dT%H:%M:%S.%fZ"
        )
    return ms_passed_since_epoch