def get_rule_id_from_name(client, parsed_args):
    results = client.list_policy_rules(parsed_args.policy_name)['results']
    rule_id = None
    for result in results:
        if result.get('name') == parsed_args.rule_id:
            if rule_id is None:
                rule_id = result.get('id')
            else:
                raise exceptions.Conflict(
                    "[Multiple rules with same name: %s]" %
                    parsed_args.rule_id)
    if rule_id is None:
        raise exceptions.NotFound(
            parsed_args.rule_id % "[No rule found with name: %s]")
    return rule_id
dataset/ETHPy150Open openstack/python-congressclient/congressclient/osc/v1/policy.py/get_rule_id_from_name/swapped operands of `%`