code: def has_executor_package_defined(provider_id: str):
      provider_sources = AIRFLOW_PROVIDERS_DIR / provider_id.replace(
          ".", "/"
      )
      for executors_folder in provider_sources.rglob("executors"):
          if (
              executors_folder.is_dir()
              and (executors_folder / "__init__.py").is_file()
          ):
              return True
      return False
  
file_path: airflow/scripts/ci/pre_commit/pre_commit_check_provider_docs.py
imports: from __future__ import annotations
  import os
  import sys
  from collections import defaultdict
  from pathlib import Path
  import yaml
  from jinja2 import BaseLoader, Environment
  from rich.console import Console
label_desc: Use image node_id 6 for calling a global function with example usage: has_executor_package_defined(provider_id) and returns: False, True