code: def generate_runs_table(
      runs: List[Run],
      include_configuration: bool = False,
      verbose: bool = False,
  ) -> Table:
      table = Table(box=None)
      table.add_column("RUN", style="bold", no_wrap=True)
      if include_configuration:
          table.add_column("CONFIGURATION", style="grey58")
      table.add_column(
          "USER", style="grey58", no_wrap=True, max_width=16
      )
      table.add_column(
          "BACKEND", style="grey58", no_wrap=True, max_width=16
      )
      if verbose:
          table.add_column("INSTANCE", no_wrap=True)
      table.add_column("RESOURCES")
      table.add_column("SPOT", no_wrap=True)
      table.add_column("PRICE", no_wrap=True)
      table.add_column("STATUS", no_wrap=True)
      table.add_column("SUBMITTED", style="grey58", no_wrap=True)
      if verbose:
          table.add_column("ERROR", no_wrap=True)
  
      for run in runs:
          run = run._run  # TODO
          job = run.jobs[0]  # TODO
          provisioning = job.job_submissions[
              -1
          ].job_provisioning_data  # TODO
  
          renderables = [run.run_spec.run_name]
          if include_configuration:
              renderables.append(run.run_spec.configuration_path)
          renderables += [
              run.user,
              provisioning.backend.value if provisioning else "",
              *_render_instance_and_resources(
                  provisioning.instance_type if provisioning else None,
                  verbose,
              ),
              (
                  "yes"
                  if provisioning.instance_type.resources.spot
                  else "no"
              )
              if provisioning
              else "",
              f"${provisioning.price:.4}" if provisioning else "",
              run.status,
              pretty_date(run.submitted_at),
          ]
          if verbose:
              renderables.append("TODO")  # TODO
          table.add_row(*renderables)
      return table
  
file_path: dstack/src/dstack/_internal/cli/utils/run.py
imports: from typing import List, Optional
  from rich.table import Table
  from dstack._internal.cli.utils.common import console
  from dstack._internal.core.models.instances import InstanceAvailability, InstanceType, Resources
  from dstack._internal.core.models.runs import RunPlan
  from dstack._internal.utils.common import pretty_date
  from dstack.api import Run
label_desc: Use image node_id 2 for calling a global function with example usage: generate_runs_table(runs, include_configuration, verbose) and returns: table