code: def valid_options(kwargs, allowed_options):
      
  
      diff = set(kwargs) - set(allowed_options)
      if diff:
          print("Invalid option(s): ", ', '.join(diff))
          return False
      return True
docs: Checks that kwargs are valid API options