In order to prevent duplication of code we will move rule_dict.update() to a dedicated _format_rule_dict() function.