code: def show_experiments(
      td: "TabularData",
      headers: Dict[str, Iterable[str]],
      keep=None,
      drop=None,
      pager=True,
      csv=False,
      markdown=False,
      **kwargs,
  ):
      if keep:
          for col in td.keys():  # noqa: SIM118
              if re.match(keep, col):
                  td.protect(col)
  
      for col in ("State", "Executor"):
          if td.is_empty(col):
              td.drop(col)
  
      row_styles = lmap(baseline_styler, td.column("typ"))
  
      if not csv:
          merge_headers = ["Experiment", "rev", "typ", "parent"]
          td.column("Experiment")[:] = map(
              prepare_exp_id, td.as_dict(merge_headers)
          )
          td.drop(*merge_headers[1:])
  
      styles = {
          "Experiment": {
              "no_wrap": True,
              "header_style": "black on grey93",
          },
          "Created": {"header_style": "black on grey93"},
          "State": {"header_style": "black on grey93"},
          "Executor": {"header_style": "black on grey93"},
      }
      header_bg_colors = {
          "metrics": "cornsilk1",
          "params": "light_cyan1",
          "deps": "plum2",
      }
      styles.update(
          {
              header: {
                  "justify": "right" if typ == "metrics" else "left",
                  "header_style": f"black on {header_bg_colors[typ]}",
                  "collapse": idx != 0,
                  "no_wrap": typ == "metrics",
              }
              for typ, hs in headers.items()
              for idx, header in enumerate(hs)
          }
      )
  
      if kwargs.get("only_changed", False):
          td.drop_duplicates("cols", ignore_empty=False)
  
      cols_to_drop = set()
      if drop is not None:
          cols_to_drop = {
              col for col in td.keys() if re.match(drop, col)
          }  # noqa: SIM118
      td.drop(*cols_to_drop)
  
      td.render(
          pager=pager,
          borders="horizontals",
          rich_table=True,
          header_styles=styles,
          row_styles=row_styles,
          csv=csv,
          markdown=markdown,
      )
  
imports: import argparse
  import re
  from datetime import date, datetime
  from typing import TYPE_CHECKING, Dict, Iterable
  from funcy import lmap
  from dvc.cli import formatter
  from dvc.cli.command import CmdBase
  from dvc.cli.utils import append_doc_link
  from dvc.commands.metrics import DEFAULT_PRECISION
  from dvc.exceptions import DvcException
  from dvc.log import logger
  from dvc.ui import ui
  from dvc.utils.serialize import encode_exception
label_desc: Use image node_id 3 for calling a global function with example usage: show_experiments(td, headers, keep, drop, pager, csv, markdown) without return types