code: def filter_allowed_args(func, **kwargs):
      """
      It takes a function and a dictionary of arguments, and returns a dictionary of arguments that are
      allowed by the function
  
      Args:
        func: The function to filter the arguments for.
  
      Returns:
        A dictionary of the arguments that are allowed in the function.
      """
      allowed_args = {
          key: val
          for key, val in kwargs.items()
          if key in func.__code__.co_varnames
      }
      for key in args_to_remove:
          if key in allowed_args:
              del allowed_args[key]
      return allowed_args
  
imports: import inspect
  from typing import Dict
label_desc: Use image node_id 2 for calling a global function with example usage: filter_allowed_args(func) and returns: allowed_args