code: def rich_table(
      ui: "Console",
      data: TableData,
      headers: Optional[Headers] = None,
      pager: bool = False,
      header_styles: Optional[
          Union[Dict[str, Styles], Sequence[Styles]]
      ] = None,
      row_styles: Optional[Sequence[Styles]] = None,
      borders: Union[bool, str] = False,
  ) -> None:
      from rich import box
  
      from dvc.utils.table import Table
  
      border_style = {
          True: box.HEAVY_HEAD,  # is a default in rich,
          False: None,
          "simple": box.SIMPLE,
          "minimal": box.MINIMAL,
          "horizontals": box.HORIZONTALS,
      }
  
      table = Table(box=border_style[borders])
  
      if isinstance(header_styles, abc.Sequence):
          hs: Dict[str, Styles] = dict(
              zip(headers or [], header_styles)
          )
      else:
          hs = header_styles or {}
  
      for header in headers or []:
          table.add_column(header, **hs.get(header, {}))
  
      rs: Sequence[Styles] = row_styles or []
      for row, style in zip_longest(data, rs):
          table.add_row(*row, **(style or {}))
  
      stack = ExitStack()
      if pager:
          stack.enter_context(
              console_width(table, ui.rich_console, SHOW_MAX_WIDTH)
          )
          stack.enter_context(ui.pager())
  
      with stack:
          ui.write(table, styled=True)
          return
  
file_path: dvc/dvc/ui/table.py
imports: from collections import abc
  from contextlib import ExitStack, contextmanager
  from itertools import zip_longest
  from typing import TYPE_CHECKING, Dict, Iterator, Optional, Sequence, Union
  from dvc.types import DictStrAny
label_desc: Use image node_id 3 for calling a global function with example usage: rich_table(ui, data, headers, pager, header_styles, row_styles, borders) without return types