def _get_rule_db(self):
    if self._rule_file_path:
        return self._get_rule_db_from_file(file_path=os.path.realpath(self._rule_file_path))
    elif self._rule_ref:
        return Rule.get_by_ref(self._rule_ref)
    raise ValueError('One of _rule_file_path or _rule_ref should be specified.')
def _get_rule_db(self):
    if self._rule_file_path:
        return self._get_rule_db_from_file(file_path=os.path.realpath(self._rule_file_path))
    elif self._rule_ref:
        return Rule.get_by_ref(self._rule_ref)
    raise ValueError('One of _rule_file_path or _rule_ref should be specified.')