code: def submit(**kwargs):
      
      if 'alert' not in kwargs:
          raise ValueError('Alert required')
  
      if 'value' not in kwargs:
          raise ValueError('Value required')
  
      alert = kwargs.pop('alert')
      value = kwargs['value']
  
      if alert(value):
          fail(kwargs)
      else:
          ok(kwargs)
docs: Shortcut that takes an alert to evaluate and makes the appropriate API
      call based on the results.
  
      :param kwargs: A list of keyword arguments
      :type kwargs: dict