Convert a decision tree model to protobuf format.

    Parameters
    ----------
    decision_tree : DecisionTreeClassifier
        A trained scikit-learn tree model.

    input_name: str
        Name of the input columns.

    output_name: str
        Name of the output columns.

    Returns
    -------
    model_spec: An object of type Model_pb.
        Protobuf representation of the model

def convert(model, input_name, output_features):
    """Convert a decision tree model to protobuf format.

    Parameters
    ----------
    decision_tree : DecisionTreeClassifier
        A trained scikit-learn tree model.

    input_name: str
        Name of the input columns.

    output_name: str
        Name of the output columns.

    Returns
    -------
    model_spec: An object of type Model_pb.
        Protobuf representation of the model
    """
    if not(HAS_SKLEARN):
        raise RuntimeError('scikit-learn not found. scikit-learn conversion API is disabled.')

    _sklearn_util.check_expected_type(model, _tree.DecisionTreeClassifier)
    _sklearn_util.check_fitted(model, lambda m: hasattr(m, 'tree_') and model.tree_ is not None)

    return _MLModel(convert_tree_ensemble(model, input_name, output_features,
            mode = 'classifier',
            class_labels = model.classes_))