code: def _command(self, args: argparse.Namespace):
      super()._command(args)
      runs = self.api.runs.list(all=args.all)
      if not args.watch:
          console.print(
              run_utils.generate_runs_table(runs, verbose=args.verbose)
          )
          return
  
      try:
          with Live(
              console=console, refresh_per_second=REFRESH_RATE_PER_SEC
          ) as live:
              while True:
                  live.update(
                      run_utils.generate_runs_table(
                          runs, verbose=args.verbose
                      )
                  )
                  time.sleep(LIVE_PROVISION_INTERVAL_SECS)
                  runs = self.api.runs.list(all=args.all)
      except KeyboardInterrupt:
          pass
  
file_path: dstack/src/dstack/_internal/cli/commands/ps.py
imports: import argparse
  import time
  from rich.live import Live
  import dstack._internal.cli.utils.run
  from dstack._internal.cli.commands import APIBaseCommand
  from dstack._internal.cli.utils.common import console
label_desc: Use image node_id 2 for calling the PsCommand obj's underlying member method code with example usage: obj._command(args) without return types