import pytz


def _make_timezone_naive_utc(datetime_object):
    """ If a given datetime is timezone-aware, convert to UTC and make timezone=naive """

    if (datetime_object.tzinfo is not None) and (datetime_object.tzinfo.utcoffset(datetime_object) is not None):
        # Convert to UTC
        utc_time = datetime_object.astimezone(pytz.utc)

        # Remove the timezone attribute to make it timezone-naive
        utc_time = utc_time.replace(tzinfo=None)

        return utc_time

    else:
        return datetime_object