code: def _has_method(
      class_name: str,
      method_names: Iterable[str],
      class_registry: dict[str, dict[str, Any]],
  ) -> bool:
      """Determines if a class or its bases in the registry have any of the specified methods.
  
      :param class_name: The name of the class to check.
      :param method_names: A list of names of methods to search for.
      :param class_registry: A dictionary representing the class registry, where each key is a class name
                              and the value is its metadata.
      :return: True if any of the specified methods are found in the class or its base classes; False otherwise.
  
      Example:
      >>> example_class_registry = {
      ...     "MyClass": {"methods": {"foo", "bar"}, "base_classes": ["BaseClass"]},
      ...     "BaseClass": {"methods": {"base_foo"}, "base_classes": []},
      ... }
      >>> _has_method("MyClass", ["foo"], example_class_registry)
      True
      >>> _has_method("MyClass", ["base_foo"], example_class_registry)
      True
      >>> _has_method("MyClass", ["not_a_method"], example_class_registry)
      False
      """
      if class_name in class_registry:
          if any(
              method in class_registry[class_name]["methods"]
              for method in method_names
          ):
              return True
          for base_name in class_registry[class_name]["base_classes"]:
              if _has_method(base_name, method_names, class_registry):
                  return True
      return False
  
file_path: airflow/docs/exts/providers_extensions.py
imports: from __future__ import annotations
  import ast
  import os
  from pathlib import Path
  from typing import Any, Iterable
  import yaml
  from provider_yaml_utils import get_provider_yaml_paths
  from docs.exts.operators_and_hooks_ref import DEFAULT_HEADER_SEPARATOR, BaseJinjaReferenceDirective, _render_template
label_desc: Use image node_id 2 for calling a global function with example usage: _has_method(class_name, method_names, class_registry) and returns: False, True, True