code: def build_args_binder(
      func, remove_self: bool = True
  ) -> Optional[Callable]:
      try:
          spec = inspect.getfullargspec(func)
      except TypeError:  # pragma: no cover
          return None
  
      sig_list = list(spec.args)
      args_list = list(spec.args)
      if remove_self:
          args_list = args_list[1:]
  
      if spec.varargs:
          sig_list.append(f"*{spec.varargs}")
          args_list.append(spec.varargs)
      elif spec.kwonlyargs:
          sig_list.append("*")
  
      sig_list.extend(spec.kwonlyargs)
      args_list.extend(spec.kwonlyargs)
  
      if spec.varkw:
          sig_list.append(f"**{spec.varkw}")
          args_list.append(spec.varkw)
  
      if getattr(func, "__name__", None).isidentifier():
          ret_func_name = f"{func.__name__}_binder"
          ret_type_name = f"_Args_{func.__name__}"
      else:
          ret_func_name = f"anon_{id(func)}_binder"
          ret_type_name = f"_ArgsAnon_{id(func)}"
  
      func_str = textwrap.dedent(
          f"""
      def {ret_func_name}({', '.join(sig_list)}):
          return {ret_type_name}({', '.join(args_list)})
      """
      )
  
      glob_vars = globals().copy()
      glob_vars[ret_type_name] = namedtuple(ret_type_name, args_list)
      loc_vars = dict()
      exec(func_str, glob_vars, loc_vars)
      ext_func = loc_vars[ret_func_name]
      ext_func.__defaults__ = spec.defaults
      ext_func.__kwdefaults__ = spec.kwonlydefaults
  
      return ext_func
  
imports: import asyncio
  import inspect
  import textwrap
  from collections import namedtuple
  from dataclasses import dataclass
  from typing import Callable, Dict, Optional, Tuple
label_desc: Use image node_id 1 for calling a global function with example usage: build_args_binder(func, remove_) and returns: ext_func, None