def _checkRuleValue(self, rule_id, rule_id_length):
    'this function looks if bits specified in ruleID are not outside of\n        rule_id_length'
    if (rule_id_length > 32):
        raise ValueError('Rule length should be less than 32')
    r1 = rule_id
    for k in range(32, rule_id_length, (- 1)):
        if (((1 << k) & r1) != 0):
            raise ValueError('rule ID too long')
this function looks if bits specified in ruleID are not outside of
rule_id_length
def _checkRuleValue(self, rule_id, rule_id_length):
    'this function looks if bits specified in ruleID are not outside of\n        rule_id_length'
    if (rule_id_length > 32):
        raise ValueError('Rule length should be less than 32')
    r1 = rule_id
    for k in range(32, rule_id_length, (- 1)):
        if (((1 << k) & r1) != 0):
            raise ValueError('rule ID too long')