code: def one_of_keyword_only(*valid_keywords):
      
  
      def decorator(func):
  
          @functools.wraps(func)
          def wrapper(*args, **kwargs):
              sentinel = object()
              values = {}
  
              for key in valid_keywords:
                  kwarg_value = kwargs.pop(key, sentinel)
                  if kwarg_value is not sentinel:
                      values[key] = kwarg_value
  
              if kwargs:
                  raise TypeError('Unexpected arguments: {}'.format(kwargs))
  
              if not values:
                  raise TypeError('Must provide one of {} as keyword argument'.format(', '.join(valid_keywords)))
  
              if len(values) > 1:
                  raise TypeError('Must provide only one of {} as keyword argument. Received {}'.format(
                      ', '.join(valid_keywords),
                      values
                  ))
  
              return func(*(args + values.popitem()))
  
          return wrapper
  
      return decorator
docs: Decorator to help make one-and-only-one keyword-only argument functions more reusable
  
      Notes:
          Decorated function should take 2 arguments, the first for the key, the second the value
  
      Examples:
  
          ::
  
              @one_of_keyword_only('a', 'b', 'c')
              def func(key, value):
                  if key == 'a':
                      ...
                  elif key == 'b':
                      ...
                  else:
                      # key = 'c'
                      ...
  
              ...
  
              func(a=1)
              func(b=2)
              func(c=3)
  
              try:
                  func(d=4)
              except TypeError:
                  ...
  
              try:
                  func(a=1, b=2)
              except TypeError:
                  ...
  
      Args:
          *valid_keywords (str): All allowed keyword argument names
  
      Raises:
          TypeError: On decorated call, if 0 or 2+ arguments are provided or kwargs contains a key not in valid_keywords