def parse_rule(rule):

    # If the rule is a string, it's in the policy language
    if isinstance(rule, six.string_types):
        return _parse_text_rule(rule)
    return _parse_list_rule(rule)
Parses a policy rule into a tree of Check objects.
dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/openstack/common/policy.py/parse_rule