code: def list_runtime(long: bool) -> None:
      with spinner():
          try:
              runtime_mgr = RuntimeManager()
          except NoRuntimesDetectedError:
              print("\nNo runtimes detected!\n")
              return
  
          if long:
              # Ensure that all runtime info are read asynchronously before printing.
              # Otherwise each runtime will read its information synchronously.
              runtime_mgr._group.fill_runtime_info_buffers_async()
  
      if long:
          runtime_mgr.print_runtime_info()
      else:
          # Only printing the hosts is much faster than reading the detailed host information
          runtime_mgr.print_hosts()
  
file_path: lazycluster/src/lazycluster/scripts/cli_handler.py
imports: import logging
  import os
  import sys
  from typing import List, Optional
  import click
  import storm.__main__
  from click_spinner import spinner
  from lazycluster import NoRuntimesDetectedError, RuntimeManager
label_desc: Use image node_id 4 for calling a global function with example usage: list_runtime(long) without return types