code: def check_sql_providers_dependency():
      error_count: int = 0
      for path in sys.argv[1:]:
          if not path.startswith("airflow/providers/"):
              continue
  
          for clazz in get_classes(path):
              if is_subclass_of_dbapihook(
                  node=clazz
              ) and has_make_serializable_method(node=clazz):
                  provider_yaml_path: str = (
                      determine_provider_yaml_path(file_path=path)
                  )
                  provider_metadata: dict = get_yaml_content(
                      file_path=provider_yaml_path
                  )
  
                  if version_constraint := get_common_sql_constraints(
                      provider_metadata=provider_metadata
                  ):
                      if not do_version_satisfies_constraints(
                          version=version_constraint
                      ):
                          error_count += 1
                          console.print(
                              f"\n[yellow]Provider {provider_metadata['name']} must have "
                              f"'{COMMON_SQL_PROVIDER_NAME}>={COMMON_SQL_PROVIDER_MIN_COMPATIBLE_VERSIONS}' as "
                              f"dependency, because `{clazz.name}` overrides the "
                              f"`{MAKE_COMMON_METHOD_NAME}` method."
                          )
      if error_count:
          console.print(
              f"The `{MAKE_COMMON_METHOD_NAME}` method was introduced in {COMMON_SQL_PROVIDER_NAME} "
              f"{COMMON_SQL_PROVIDER_MIN_COMPATIBLE_VERSIONS}. You cannot rely on an older version of this "
              "provider to override this method."
          )
          sys.exit(1)
  
file_path: airflow/scripts/ci/pre_commit/pre_commit_check_common_sql_dependency.py
imports: from __future__ import annotations
  import ast
  import pathlib
  import sys
  from typing import Iterable
  import yaml
  from packaging.specifiers import SpecifierSet
  from rich.console import Console
label_desc: Use image node_id 8 for calling a global function with example usage: check_sql_providers_dependency() without return types