code: def average_datetimes(datetime_list):
      """Average a series of datetime objects.
  
      .. note::
  
          This function assumes all datetime objects are naive and in the same
          time zone (UTC).
  
      Args:
          datetime_list (iterable): Datetime objects to average
  
      Returns: Average datetime as a datetime object
  
      """
      total = [datetime.timestamp(dt) for dt in datetime_list]
      return datetime.fromtimestamp(sum(total) / len(total))
  
imports: from collections.abc import Collection
  from datetime import datetime
  from functools import partial, reduce
  from operator import eq, is_
  import numpy
  from satpy.writers.utils import flatten_dict
label_desc: Use image node_id 5 for calling a global function with example usage: average_datetimes(datetime_list) and returns: datetime