def _serialize_rules(rules):
result = [(rule_name, str(rule)) for rule_name, rule in rules.items()]<EOL>return sorted(result, key=lambda rule: rule[<NUM_LIT:0>])<EOL>
Serialize all the Rule object as string.

    New string is used to compare the rules list.