code: def _find_clazzes(directory, base_class):
      found_classes = set()
      for module_finder, name, ispkg in pkgutil.iter_modules(
          [directory]
      ):
          if ispkg:
              continue
  
          relative_path = os.path.relpath(
              module_finder.path, AIRFLOW_ROOT
          )
          package_name = relative_path.replace("/", ".")
          full_module_name = package_name + "." + name
          try:
              mod = import_module(full_module_name)
          except ModuleNotFoundError:
              print(
                  f"Module {full_module_name} can not be loaded.",
                  file=sys.stderr,
              )
              continue
  
          clazzes = inspect.getmembers(mod, inspect.isclass)
          integration_clazzes = [
              clazz
              for name, clazz in clazzes
              if issubclass(clazz, base_class)
              and clazz.__module__.startswith(package_name)
          ]
  
          for found_clazz in integration_clazzes:
              found_classes.add(
                  f"{found_clazz.__module__}.{found_clazz.__name__}"
              )
  
      return found_classes
  
file_path: airflow/scripts/tools/list-integrations.py
imports: from __future__ import annotations
  import argparse
  import inspect
  import os
  import pkgutil
  import sys
  from importlib import import_module
  from pathlib import Path
  import airflow
  from airflow.hooks.base import BaseHook
  from airflow.models.baseoperator import BaseOperator
  from airflow.secrets import BaseSecretsBackend
  from airflow.sensors.base import BaseSensorOperator
label_desc: Use image node_id 1 for calling a global function with example usage: _find_clazzes(directory, base_class) and returns: found_classes