<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def average_datetimes(dt_list):
 """Average a series of datetime objects. .. note:: This function assumes all datetime objects are naive and in the same time zone (UTC). Args: dt_list (iterable):
 Datetime objects to average Returns: Average datetime as a datetime object """

    if sys.version_info < (3, 3):
        # timestamp added in python 3.3
        import time

        def timestamp_func(dt):
            return time.mktime(dt.timetuple())
    else:
        timestamp_func = datetime.timestamp

    total = [timestamp_func(dt) for dt in dt_list]
    return datetime.fromtimestamp(sum(total) / len(total))