code: def keywords_catch(func):
      """
      A decorator that forces keyword arguments in the wrapped method
      and saves actual input keyword arguments in `_kwargs`.
  
      Notes
      -----
      Should only be used to wrap a method where first arg is `self`
      """
  
      @wraps(func)
      def wrapper(self, *args, **kwargs):
          if len(args) > 0:
              raise TypeError(
                  "Method %s forces keyword arguments." % func.__name__
              )
          self._kwargs = kwargs
          return func(self, **kwargs)
  
      return wrapper
  
imports: import sys
  from functools import wraps
  from horovod.spark.common.backend import SparkBackend
  from pyspark.context import SparkContext
label_desc: Use image node_id 1 for calling a global function with example usage: keywords_catch(func) and returns: wrapper, func