code: def get_tree_info(decision_tree,
                    feature_names=None,
                    **export_graphviz_kwargs):
      # type: (...) -> TreeInfo
      
      return TreeInfo(
          criterion=decision_tree.criterion,
          tree=_get_root_node_info(decision_tree, feature_names),
          graphviz=tree2dot(decision_tree,
                            feature_names=feature_names,
                            **export_graphviz_kwargs),
          is_classification=isinstance(decision_tree, ClassifierMixin),
      )
docs: Convert DecisionTreeClassifier or DecisionTreeRegressor
      to an inspectable object.