docs: def localize(dt):
      """Localize a datetime object to local time."""
      if dt.tzinfo is UTC:
          return (dt + LOCAL_UTC_OFFSET).replace(tzinfo=None)
      # No TZ info so not going to assume anything, return as-is.
      return dt