def METHOD_NAME(d, default_timezone=ZoneInfo("UTC"), time=monotonic):
    """Convert datetime to timestamp.
    If d' is already a timestamp, then that will be used.
    """
    if isinstance(d, datetime):
        if d.tzinfo is None:
            d = d.replace(tzinfo=default_timezone)
        diff = _time() - time()
        return max((d - EPOCH).total_seconds() - diff, 0)
    return d