code: def ensure_airflow_version(revisions: Iterable[Script]):
      for rev in revisions:
          assert rev.module.__file__ is not None  # For Mypy.
          file = Path(rev.module.__file__)
          content = file.read_text()
          if not has_version(content):
              insert_version(content, file)
  
imports: from __future__ import annotations
  import os
  import re
  import textwrap
  from pathlib import Path
  from typing import TYPE_CHECKING, Iterable
  from alembic.script import ScriptDirectory
  from rich.console import Console
  from tabulate import tabulate
  from airflow import __version__
  from airflow.utils.db import _get_alembic_config
label_desc: Use image node_id 7 for calling a global function with example usage: ensure_airflow_version(revisions) without return types