def convert(self, tree_edge: TreeEdge):
    if (tree_edge.threshold != 0.5):
        print(('Unexpected tree edge threshold value: ' + str(tree_edge.threshold)))
    dt_descriptive_attribute = self.decision_tree_feature_id_converter.convert(tree_edge.feature_id)
    splitted_string = dt_descriptive_attribute.split(self.ohe_prefix_separator)
    if (len(splitted_string) == 1):
        feature_name = dt_descriptive_attribute
        if tree_edge.is_left:
            feature_value = str(0)
        else:
            feature_value = str(1)
        return EQLiteral(attribute=feature_name, value=feature_value)
    elif (len(splitted_string) == 2):
        feature_name = splitted_string[0]
        feature_value = splitted_string[1]
        if tree_edge.is_left:
            return NEQLiteral(attribute=feature_name, value=feature_value)
        else:
            return EQLiteral(attribute=feature_name, value=feature_value)
    else:
        raise Exception(('Unexpected feature name:' + dt_descriptive_attribute))
def convert(self, tree_edge: TreeEdge):
    if (tree_edge.threshold != 0.5):
        print(('Unexpected tree edge threshold value: ' + str(tree_edge.threshold)))
    dt_descriptive_attribute = self.decision_tree_feature_id_converter.convert(tree_edge.feature_id)
    splitted_string = dt_descriptive_attribute.split(self.ohe_prefix_separator)
    if (len(splitted_string) == 1):
        feature_name = dt_descriptive_attribute
        if tree_edge.is_left:
            feature_value = str(0)
        else:
            feature_value = str(1)
        return EQLiteral(attribute=feature_name, value=feature_value)
    elif (len(splitted_string) == 2):
        feature_name = splitted_string[0]
        feature_value = splitted_string[1]
        if tree_edge.is_left:
            return NEQLiteral(attribute=feature_name, value=feature_value)
        else:
            return EQLiteral(attribute=feature_name, value=feature_value)
    else:
        raise Exception(('Unexpected feature name:' + dt_descriptive_attribute))