code: def create_process_table(height: int) -> Table:
      processes = sorted(
          [generate_process(pid) for pid in range(height)],
          key=lambda p: p.cpu_percent,
          reverse=True,
      )
      table = Table(
          "PID",
          "Command",
          "CPU %",
          "Memory",
          "Time",
          "Thread #",
          "State",
          box=box.SIMPLE,
      )
  
      for process in processes:
          table.add_row(
              str(process.pid),
              process.command,
              f"{process.cpu_percent:.1f}",
              process.memory_str,
              process.time_str,
              str(process.thread_count),
              process.state,
          )
  
      return table
  
file_path: rich/examples/top_lite_simulator.py
imports: import datetime
  import random
  import sys
  import time
  from dataclasses import dataclass
  from rich import box
  from rich.console import Console
  from rich.live import Live
  from rich.table import Table
label_desc: Use image node_id 2 for calling a global function with example usage: create_process_table(height) and returns: table