code: def set_rules(self, rules):
          
          self.rules_to_ignore = rules.get("ignore", [])
          self.rules_to_run = rules.get("apply", [])
docs: Sets the rules to be run or ignored for the audit.
  
          Args:
  
              rules: a dictionary of the format `{"ignore": [], "apply": []}`.
  
          See https://github.com/GoogleChrome/accessibility-developer-tools/tree/master/src/audits
  
          Passing `{"apply": []}` or `{}` means to check for all available rules.
  
          Passing `{"apply": None}` means that no audit should be done for this page.
  
          Passing `{"ignore": []}` means to run all otherwise enabled rules.
          Any rules in the "ignore" list will be ignored even if they were also
          specified in the "apply".
  
          Examples:
  
              To check only `badAriaAttributeValue`::
  
                  page.a11y_audit.config.set_rules({
                      "apply": ['badAriaAttributeValue']
                  })
  
              To check all rules except `badAriaAttributeValue`::
  
                  page.a11y_audit.config.set_rules({
                      "ignore": ['badAriaAttributeValue'],
                  })