code: def _change_decorator_function_type(
      decorated: CallableType,
      decorator: CallableType,
      provided_arguments: list[str],
  ) -> CallableType:
      decorator.arg_kinds = decorated.arg_kinds
      decorator.arg_names = decorated.arg_names
  
      # Mark provided arguments as optional
      decorator.arg_types = copy.copy(decorated.arg_types)
      for argument in provided_arguments:
          try:
              index = decorated.arg_names.index(argument)
          except ValueError:
              continue
          decorated_type = decorated.arg_types[index]
          decorator.arg_types[index] = UnionType.make_union(
              [decorated_type, NoneType()]
          )
          decorated.arg_kinds[index] = ARG_NAMED_OPT
  
      return decorator
  
file_path: airflow/dev/mypy/plugin/decorators.py
imports: from __future__ import annotations
  import copy
  import functools
  from mypy.nodes import ARG_NAMED_OPT
  from mypy.plugin import FunctionContext, Plugin
  from mypy.types import CallableType, NoneType, UnionType
label_desc: Use image node_id 2 for calling a global function with example usage: _change_decorator_function_type(decorated, decorator, provided_arguments) and returns: decorator