docs: def isoformat(dt, localtime=False, *args, **kwargs):
      """Return the ISO8601-formatted UTC representation of a datetime object."""
      if localtime and dt.tzinfo is not None:
          localized = dt
      else:
          if dt.tzinfo is None:
              localized = UTC.localize(dt)
          else:
              localized = dt.astimezone(UTC)
      return localized.isoformat(*args, **kwargs)