code: def iter_decorated_operators(
      source: pathlib.Path,
  ) -> Iterator[ast.ClassDef]:
      mod = ast.parse(source.read_text("utf-8"), str(source))
      for node in ast.walk(mod):
          if isinstance(node, ast.ClassDef) and any(
              isinstance(base, ast.Name)
              and base.id == "DecoratedOperator"
              for base in node.bases
          ):
              yield node
  
file_path: airflow/scripts/ci/pre_commit/pre_commit_decorator_operator_implements_custom_name.py
imports: from __future__ import annotations
  import ast
  import itertools
  import pathlib
  import sys
  from typing import Iterator
label_desc: Use image node_id 1 for calling a global function with example usage: iter_decorated_operators(source) without return types