def _process_rules_list(rules, match_rule):
 if isinstance(match_rule, policy.RuleCheck):
  rules.append(match_rule.match)
 elif isinstance(match_rule, policy.AndCheck):
  for rule in match_rule.rules:
   _process_rules_list(rules, rule)
 return rules

def _process_rules_list ( rules , match_rule ) : if isinstance ( match_rule , policy . RuleCheck ) : rules . append ( match_rule . match ) elif isinstance ( match_rule , policy . AndCheck ) : for rule in match_rule . rules : _process_rules_list ( rules , rule ) return rules
recursively walk a policy rule to extract a list of match entries .