code: def prepare_rules(self, attributes = [], ip_ranges = [], params = {}):
          
          for filename in self.rule_definitions:
              if filename in self.rules:
                  for rule in self.rules[filename]:
                      rule.set_definition(self.rule_definitions, attributes, ip_ranges, params)
              else:
                  self.rules[filename] = []
                  new_rule = Rule(filename, self.rule_type, {'enabled': False, 'level': 'danger'})
                  new_rule.set_definition(self.rule_definitions, attributes, ip_ranges, params)
                  self.rules[filename].append(new_rule)
docs: Update the ruleset's rules by duplicating fields as required by the HTML ruleset generator
  
          :return: