docs: def convert_timedelta(obj):
      """Returns a TIME column as a timedelta object:
  
        >>> timedelta_or_None('25:06:17')
        datetime.timedelta(1, 3977)
        >>> timedelta_or_None('-25:06:17')
        datetime.timedelta(-2, 83177)
  
      Illegal values are returned as None:
  
        >>> timedelta_or_None('random crap') is None
        True
  
      Note that MySQL always returns TIME columns as (+|-)HH:MM:SS, but
      can accept values as (+|-)DD HH:MM:SS. The latter format will not
      be parsed correctly by this function.
      """
      try:
          microseconds = 0
          if "." in obj:
              (obj, tail) = obj.split('.')
              microseconds = float('0.' + tail) * 1e6
          hours, minutes, seconds = obj.split(':')
          negate = 1
          if hours.startswith("-"):
              hours = hours[1:]
              negate = -1
          tdelta = datetime.timedelta(
              hours = int(hours),
              minutes = int(minutes),
              seconds = int(seconds),
              microseconds = int(microseconds)
              ) * negate
          return tdelta
      except ValueError:
          return None