def format_runtime_string(raw_seconds: float) -> str:
  """Creates a nice format string from a potentially large number of seconds.

  Args:
    raw_seconds: A number of seconds.

  Returns:
    The seconds divided into hours, minutes, and remaining seconds, formatted
        nicely. For example, 2h3m5.012s.
  """
  minutes, seconds = divmod(raw_seconds, 60)
  hours, minutes = divmod(minutes, 60)
  seconds = round(seconds, 3)
  output = ''
  if hours > 0:
    output += f'{int(hours)}h'
  if minutes > 0:
    output += f'{int(minutes)}m'
  if seconds > 0 or not output:
    output += f'{seconds}s'
  return output