code: def check_missing_custom_operator_name(klass: ast.ClassDef) -> bool:
      for node in ast.iter_child_nodes(klass):
          if isinstance(node, ast.AnnAssign):
              if (
                  isinstance(node.target, ast.Name)
                  and node.target.id == "custom_operator_name"
              ):
                  return True
          elif isinstance(node, ast.Assign):
              if any(
                  isinstance(t, ast.Name)
                  and t.id == "custom_operator_name"
                  for t in node.targets
              ):
                  return True
      return False
  
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 2 for calling a global function with example usage: check_missing_custom_operator_name(klass) and returns: False, True, True