<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def utc_dt(dt):
 """Set UTC timezone on a datetime object. A naive datetime is assumed to be in UTC TZ. """

    if not dt.tzinfo:
        return pytz.utc.localize(dt)
    return dt.astimezone(pytz.utc)