code: def main() -> int:
      for path in sys.argv[1:]:
          import_count = 0
          local_error_count = 0
          for imp in get_imports(path):
              import_count += 1
              if len(imp.module) > 3:
                  if imp.module[:4] == [
                      "airflow",
                      "providers",
                      "cncf",
                      "kubernetes",
                  ]:
                      if path not in EXCEPTIONS:
                          local_error_count += 1
                          errors.append(
                              f"{path}: ({'.'.join(imp.module)})"
                          )
          console.print(
              f"[blue]{path}:[/] Import count: {import_count}, error_count {local_error_count}"
          )
      if errors:
          console.print(
              "[red]Some files imports from `airflow.providers.cncf.kubernetes` and they are not allowed.[/]\n"
              "Only few k8s executors exceptions are allowed to use `airflow.providers.cncf.kubernetes`."
          )
          console.print("Error summary:")
          for error in errors:
              console.print(error)
          return 1
      else:
          console.print("[green]All good!")
      return 0
  
file_path: airflow/scripts/ci/pre_commit/pre_commit_check_cncf_k8s_used_for_k8s_executor_only.py
imports: from __future__ import annotations
  import ast
  import sys
  from typing import NamedTuple
  from rich.console import Console
label_desc: Use image node_id 2 for calling a global function with example usage: main() and returns: int, int