def apply_rules(page, response=None):
 if (response is None):
  response = {}
 for rule in RULESET:
  response = rule(page, response)
 return response

def apply_rules ( page , response = None ) : if ( response is None ) : response = { } for rule in RULESET : response = rule ( page , response ) return response
applies all rules .