code: def _match_arguments(
      init_def: tuple[str, list[ast.arg]],
      deco_def: tuple[str, list[ast.arg]],
  ) -> collections.abc.Iterator[str]:
      init_name, init_args = init_def
      deco_name, deco_args = deco_def
      for i, (ini, dec) in enumerate(
          itertools.zip_longest(init_args, deco_args, fillvalue=None)
      ):
          if ini is None and dec is not None:
              yield f"Argument present in @{deco_name} but missing from {init_name}: {dec.arg}"
              return
          if dec is None and ini is not None:
              yield f"Argument present in {init_name} but missing from @{deco_name}: {ini.arg}"
              return
          assert (
              ini is not None and dec is not None
          )  # Because None is only possible as fillvalue.
  
          if ini.arg != dec.arg:
              yield f"Argument {i + 1} mismatch: {init_name} has {ini.arg} but @{deco_name} has {dec.arg}"
              return
  
          if getattr(ini, "type_comment", None):  # 3.8+
              yield f"Do not use type comments on {init_name} argument: {ini.arg}"
          if getattr(dec, "type_comment", None):  # 3.8+
              yield f"Do not use type comments on @{deco_name} argument: {dec.arg}"
  
          # Poorly implemented node equality check.
          if (
              ini.annotation
              and dec.annotation
              and ast.dump(ini.annotation) != ast.dump(dec.annotation)
          ):
              yield (
                  f"Type annotations differ on argument {ini.arg} between {init_name} and @{deco_name}: "
                  f"{_reveal(ini.annotation)} != {_reveal(dec.annotation)}"
              )
          else:
              if not ini.annotation:
                  yield f"Type annotation missing on {init_name} argument: {ini.arg}"
              if not dec.annotation:
                  yield f"Type annotation missing on @{deco_name} argument: {ini.arg}"
  
file_path: airflow/scripts/ci/pre_commit/pre_commit_sync_init_decorator.py
imports: from __future__ import annotations
  import ast
  import collections.abc
  import itertools
  import pathlib
  import sys
label_desc: Use image node_id 5 for calling a global function with example usage: _match_arguments(init_def, deco_def) without return types