code: def average(self, dt=None):
          
          if dt is None:
              dt = self.now(self.tz)
  
          diff = self.diff(dt, False)
          return self.add(
              microseconds=(diff.in_seconds() * 1000000 + diff.microseconds) // 2
          )
docs: Modify the current instance to the average
          of a given instance (default now) and the current instance.
  
          :type dt: DateTime or datetime
  
          :rtype: DateTime