def _format_secs(secs: float):
  """Formats seconds like 123456.7 to strings like "1d10h17m"."""
  s = ""
  days = int(secs / (3600 * 24))
  secs -= days * 3600 * 24
  if days:
    s += f"{days}d"
  hours = int(secs / 3600)
  secs -= hours * 3600
  if hours:
    s += f"{hours}h"
  mins = int(secs / 60)
  s += f"{mins}m"
  return s