code: def minimal_kwargs(
      kwargs: Dict[Text, Any],
      func: Callable,
      excluded_keys: Optional[List] = None,
  ) -> Dict[Text, Any]:
      """Returns only the kwargs which are required by a function. Keys, contained in
      the exception list, are not included.
  
      Args:
          kwargs: All available kwargs.
          func: The function which should be called.
          excluded_keys: Keys to exclude from the result.
  
      Returns:
          Subset of kwargs which are accepted by `func`.
  
      """
      excluded_keys = excluded_keys or []
  
      possible_arguments = arguments_of(func)
  
      return {
          k: v
          for k, v in kwargs.items()
          if k in possible_arguments and k not in excluded_keys
      }
  
imports: import asyncio
  import functools
  import importlib
  import inspect
  import logging
  from typing import Text, Dict, Optional, Any, List, Callable, Collection, Type
  from rasa.shared.exceptions import RasaException
label_desc: Use image node_id 8 for calling a global function with example usage: minimal_kwargs(kwargs, func, excluded_keys) and returns: unknown