docs: def serialize_duration(attr, **kwargs):
          """Serialize TimeDelta object into ISO-8601 formatted string.
  
          :param TimeDelta attr: Object to be serialized.
          :rtype: str
          """
          if isinstance(attr, str):
              attr = isodate.parse_duration(attr)
          return isodate.duration_isoformat(attr)