def format_time_string(seconds):
  """
  Format a time string the way I want it.
  You would think I wouldn't have to write this myself!

  Parameters
  ----------
  seconds : float

  Returns
  -------
  str
      E.g. "1 hour, 42 minutes, and 7 seconds"
  """
  if seconds < 0:
    raise ValueError("")
  if seconds < 1:
    return "{} seconds".format(seconds)

  # truncate float to nearest int
  seconds = int(seconds)
  minutes, seconds = divmod(seconds, 60)
  hours, minutes = divmod(minutes, 60)
  days, hours = divmod(hours, 24)

  # construct string, start at the largest element
  s = "{} second{}".format(seconds, 's' if seconds != 1 else '')
  if minutes > 0:
    s = "{} minute{}, and ".format(minutes, 's' if minutes != 1 else '') + s
  if hours > 0:
    s = "{} hour{}, ".format(hours, 's' if hours != 1 else '') + s
  if days > 0:
    s = "{} day{}, ".format(days, 's' if days != 1 else '') + s

  return s