def parse_rule(rule: str, raise_error=False):
    """Parses policy to a tree of Check objects."""

    parser = Parser(raise_error)
    return parser.parse(rule)
Parses policy to a tree of Check objects.