code: def serialize(o: object) -> tuple[U, str, int, bool]:
      from datetime import date, datetime, timedelta
  
      if isinstance(o, datetime):
          qn = qualname(o)
  
          tz = serialize_timezone(o.tzinfo) if o.tzinfo else None
  
          return (
              {TIMESTAMP: o.timestamp(), TIMEZONE: tz},
              qn,
              __version__,
              True,
          )
  
      if isinstance(o, date):
          return o.isoformat(), qualname(o), __version__, True
  
      if isinstance(o, timedelta):
          return o.total_seconds(), qualname(o), __version__, True
  
      return "", "", 0, False
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from airflow.serialization.serializers.timezone import deserialize, serialize
  from airflow.utils.module_loading import qualname
  from airflow.utils.timezone import parse_timezone
label_desc: Use image node_id 1 for calling a global function with example usage: serialize(o) and returns: str,  str,  int,  False, dict,  qn,  __version__,  True, o,  qualname,  __version__,  True, o,  qualname,  __version__,  True