class_docstr: This object adapts decision trees constructed by the various libraries such as scikit-learn's and XGBoost's
  DecisionTree(Regressor|Classifier) to dtreeviz.  As part of the construction process, the samples
  considered at decision and leaf nodes are saved as a big dictionary for use by the nodes.
  
  The decision trees for classifiers and regressors from scikit-learn and
  XGBoost etc... are built for efficiency, not ease of tree walking. This class
  wraps all of that information in an easy-to-use and consistent interface
  that hides the details of the various decision tree libraries.
  
  Field leaves is list of shadow leaf nodes.
  Field internal is list of shadow non-leaf nodes.
  Field root is the shadow tree root.
class_docstr_tok: ["This","object","adapts","decision","trees","constructed","by","the","various","libraries","such","as","scikit-learn","'s","and","XGBoost's","DecisionTree","(","Regressor|Classifier",")","to","dtreeviz",".","As","part","of","the","construction","process",",","the","samples","considered","at","decision","and","leaf","nodes","are","saved","as","a","big","dictionary","for","use","by","the","nodes",".","The","decision","trees","for","classifiers","and","regressors","from","scikit-learn","and","XGBoost","etc","...","are","built","for","efficiency",",","not","ease","of","tree","walking",".","This","class","wraps","all","of","that","information","in","an","easy-to-use","and","consistent","interface","that","hides","the","details","of","the","various","decision","tree","libraries",".","Field","leaves","is","list","of","shadow","leaf","nodes",".","Field","internal","is","list","of","shadow","non-leaf","nodes",".","Field","root","is","the","shadow","tree","root","."]
docstr: Given an x - vector of features, return predicted class or value based upon this tree.
  Also return path from root to leaf as 2nd value in return tuple.
  
  Recursively walk down tree from root to appropriate leaf by comparing feature in x to node's split value.
  
  :param
  x: np.ndarray
      Feature vector to run down the tree to a  leaf.
docstr_tok: ["Given","an","x","-","vector","of","features",",","return","predicted","class","or","value","based","upon","this","tree",".","Also","return","path","from","root","to","leaf","as","2nd","value","in","return","tuple",".","Recursively","walk","down","tree","from","root","to","appropriate","leaf","by","comparing","feature","in","x","to","node","'s","split","value",".",":","param","x",":","np.ndarray","Feature","vector","to","run","down","the","tree","to","a","leaf","."]
code: def predict(self, x: np.ndarray) -> Number:
      """
      Given an x - vector of features, return predicted class or value based upon this tree.
      Also return path from root to leaf as 2nd value in return tuple.
  
      Recursively walk down tree from root to appropriate leaf by comparing feature in x to node's split value.
  
      :param
      x: np.ndarray
          Feature vector to run down the tree to a  leaf.
      """
  
      def walk(t, x):
          if t.isleaf():
              return t
          if self.shouldGoLeftAtSplit(t.id, x[t.feature()]):
              return walk(t.left, x)
          return walk(t.right, x)
  
      leaf = walk(self.root, x)
      return leaf.prediction()
  
imports: from abc import ABC, abstractmethod
  from numbers import Number
  from typing import List, Tuple, Mapping
  import numpy
  import pandas
  import sklearn
  from dtreeviz import utils
label_desc: Use image node_id 30 for calling the ShadowDecTree obj's underlying member method code with example usage: obj.predict(x) and returns: leaf, walk, t, walk