from datetime import datetime
import pytz


def to_naive_utc_dt(dt):
    """
    Converts a datetime to a naive datetime (no tzinfo)
    as follows:

    if inbound dt is already naive, it just returns it

    if inbound is timezone aware, converts it to UTC,
    then strips the tzinfo

    """
    if not isinstance(dt, datetime):
        raise TypeError('Arg must be type datetime')

    if dt.tzinfo is None:
        return dt

    return dt.astimezone(pytz.utc).replace(tzinfo=None)