def _check_rule_exists(self, rule_id):
    if (self.rules.get(rule_id, None) is None):
        logging.warning("Rule {} doesn't exist".format(rule_id))
        return False
    else:
        logging.debug('Rule {} exists'.format(rule_id))
        return True
def _check_rule_exists(self, rule_id):
    if (self.rules.get(rule_id, None) is None):
        logging.warning("Rule {} doesn't exist".format(rule_id))
        return False
    else:
        logging.debug('Rule {} exists'.format(rule_id))
        return True