code: def prepare(self, rule):
          
          if self.parser:
              rule = self.parser.parse(rule)
          if self.compiler:
              rule = self.compiler.compile(rule)
          return rule
docs: Parse and/or compile given rule into rule tree.
  
          :param rule: Filtering grammar rule.
          :return: Parsed and/or compiled rule.