code: def find_all_entities(
      imported_classes: list[str],
      base_package: str,
      ancestor_match: type,
      sub_package_pattern_match: str,
      expected_class_name_pattern: str,
      unexpected_class_name_patterns: set[str],
      exclude_class_type: type | None = None,
      false_positive_class_names: set[str] | None = None,
  ) -> VerifiedEntities:
      """Returns set of entities containing all subclasses in package specified.
  
      :param imported_classes: entities imported from providers
      :param base_package: base package name where to start looking for the entities
      :param sub_package_pattern_match: this string is expected to appear in the sub-package name
      :param ancestor_match: type of the object the method looks for
      :param expected_class_name_pattern: regexp of class name pattern to expect
      :param unexpected_class_name_patterns: set of regexp of class name pattern that are not expected
      :param exclude_class_type: exclude class of this type (Sensor are also Operators, so
             they should be excluded from the list)
      :param false_positive_class_names: set of class names that are wrongly recognised as badly named
      """
      found_entities: set[str] = set()
      wrong_entities: list[tuple[type, str]] = []
      for imported_name in imported_classes:
          module, class_name = imported_name.rsplit(".", maxsplit=1)
          the_class = getattr(
              importlib.import_module(module), class_name
          )
          if (
              is_class(the_class=the_class)
              and not is_example_dag(imported_name=imported_name)
              and is_from_the_expected_base_package(
                  the_class=the_class, expected_package=base_package
              )
              and is_imported_from_same_module(
                  the_class=the_class, imported_name=imported_name
              )
              and inherits_from(
                  the_class=the_class, expected_ancestor=ancestor_match
              )
              and not inherits_from(
                  the_class=the_class,
                  expected_ancestor=exclude_class_type,
              )
              and package_name_matches(
                  the_class=the_class,
                  expected_pattern=sub_package_pattern_match,
              )
          ):
              if (
                  not false_positive_class_names
                  or class_name not in false_positive_class_names
              ):
                  if not re.match(
                      expected_class_name_pattern, class_name
                  ):
                      wrong_entities.append(
                          (
                              the_class,
                              f"The class name {class_name} is wrong. "
                              f"It should match {expected_class_name_pattern}",
                          )
                      )
                      continue
                  if unexpected_class_name_patterns:
                      for (
                          unexpected_class_name_pattern
                      ) in unexpected_class_name_patterns:
                          if re.match(
                              unexpected_class_name_pattern, class_name
                          ):
                              wrong_entities.append(
                                  (
                                      the_class,
                                      f"The class name {class_name} is wrong. "
                                      f"It should not match {unexpected_class_name_pattern}",
                                  )
                              )
              found_entities.add(imported_name)
      return VerifiedEntities(
          all_entities=found_entities, wrong_entities=wrong_entities
      )
  
imports: from __future__ import annotations
  import importlib
  import json
  import logging
  import os
  import pkgutil
  import re
  import subprocess
  import sys
  import traceback
  import warnings
  from enum import Enum
  from inspect import isclass
  from pathlib import Path
  from typing import NamedTuple
  from rich.console import Console
  from airflow.exceptions import AirflowOptionalProviderFeatureException
  from airflow.secrets import BaseSecretsBackend
label_desc: Use image node_id 15 for calling a global function with example usage: find_all_entities(imported_classes, base_package, ancestor_match, sub_package_pattern_match, expected_class_name_pattern, unexpected_class_name_patterns, exclude_class_type, false_positive_class_names) and returns: VerifiedEntities