docs: def decimal_relative_time(d, other=None, ndigits=0, cardinalize=True):
      """Get a tuple representing the relative time difference between two
      :class:`~datetime.datetime` objects or one
      :class:`~datetime.datetime` and now.
  
      Args:
          d (datetime): The first datetime object.
          other (datetime): An optional second datetime object. If
              unset, defaults to the current time as determined
              :meth:`datetime.utcnow`.
          ndigits (int): The number of decimal digits to round to,
              defaults to ``0``.
          cardinalize (bool): Whether to pluralize the time unit if
              appropriate, defaults to ``True``.
      Returns:
          (float, str): A tuple of the :class:`float` difference and
             respective unit of time, pluralized if appropriate and
             *cardinalize* is set to ``True``.
  
      Unlike :func:`relative_time`, this method's return is amenable to
      localization into other languages and custom phrasing and
      formatting.
  
      >>> now = datetime.utcnow()
      >>> decimal_relative_time(now - timedelta(days=1, seconds=3600), now)
      (1.0, 'day')
      >>> decimal_relative_time(now - timedelta(seconds=0.002), now, ndigits=5)
      (0.002, 'seconds')
      >>> decimal_relative_time(now, now - timedelta(days=900), ndigits=1)
      (-2.5, 'years')
  
      """
      if other is None:
          other = datetime.utcnow()
      diff = other - d
      diff_seconds = total_seconds(diff)
      abs_diff = abs(diff)
      b_idx = bisect.bisect(_BOUND_DELTAS, abs_diff) - 1
      bbound, bunit, bname = _BOUNDS[b_idx]
      f_diff = diff_seconds / total_seconds(bunit)
      rounded_diff = round(f_diff, ndigits)
      if cardinalize:
          return rounded_diff, _cardinalize_time_unit(bname, abs(rounded_diff))
      return rounded_diff, bname