code: def _get_session_arg_and_default(
      args: ast.arguments,
  ) -> _SessionArgument | None:
      arguments = reversed([*args.args, *args.kwonlyargs])
      defaults = reversed([*args.defaults, *args.kw_defaults])
      for argument, default in itertools.zip_longest(
          arguments, defaults, fillvalue=None
      ):
          if argument is None:
              continue  # Impossible since a function can't have more defaults than arguments.
          if argument.arg != "session":
              continue
          return _SessionArgument(argument, default)
      return None
  
file_path: airflow/scripts/ci/pre_commit/pre_commit_new_session_in_provide_session.py
imports: from __future__ import annotations
  import ast
  import enum
  import itertools
  import pathlib
  import sys
  import typing
label_desc: Use image node_id 1 for calling a global function with example usage: _get_session_arg_and_default(args) and returns: None, _SessionArgument