code: def update_static_checks_array(
      hooks: dict[str, list[str]], image_hooks: list[str]
  ):
      rows = []
      for hook_id, hook_description in sorted(hooks.items()):
          formatted_hook_description = (
              hook_description[0]
              if len(hook_description) == 1
              else "* " + "\n* ".join(hook_description)
          )
          rows.append(
              (
                  hook_id,
                  formatted_hook_description,
                  " * " if hook_id in image_hooks else "  ",
              )
          )
      formatted_table = (
          "\n"
          + tabulate(
              rows,
              tablefmt="grid",
              headers=("ID", "Description", "Image"),
          )
          + "\n\n"
      )
      insert_documentation(
          file_path=AIRFLOW_SOURCES_ROOT_PATH
          / "STATIC_CODE_CHECKS.rst",
          content=formatted_table.splitlines(keepends=True),
          header="  .. BEGIN AUTO-GENERATED STATIC CHECK LIST",
          footer="  .. END AUTO-GENERATED STATIC CHECK LIST",
      )
  
file_path: airflow/scripts/ci/pre_commit/pre_commit_check_pre_commit_hooks.py
imports: from __future__ import annotations
  import argparse
  import sys
  from pathlib import Path
  from collections import defaultdict
  from typing import Any
  import yaml
  from common_precommit_black_utils import black_format
  from common_precommit_utils import AIRFLOW_BREEZE_SOURCES_PATH, AIRFLOW_SOURCES_ROOT_PATH, insert_documentation
  from rich.console import Console
  from tabulate import tabulate
label_desc: Use image node_id 4 for calling a global function with example usage: update_static_checks_array(hooks, image_hooks) without return types