import pytz


def as_utc(dt):
    """Return the given naive datetime with tzinfo=UTC."""
    if dt.tzinfo and dt.tzinfo != pytz.utc:
        raise ValueError(f"{dt} already contains non-UTC tzinfo data")
    return pytz.utc.localize(dt) if dt.tzinfo is None else dt