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: Get the number of samples for each leaf.
  
  There is the option to filter the leaves with samples between min_samples and max_samples.
  
  Parameters
  ----------
  min_samples: int
      Min number of samples for a leaf
  max_samples: int
      Max number of samples for a leaf
  
  :return: tuple
      Contains a numpy array of leaf ids and an array of leaf samples
docstr_tok: ["Get","the","number","of","samples","for","each","leaf",".","There","is","the","option","to","filter","the","leaves","with","samples","between","min_samples","and","max_samples",".","Parameters","--","--","--","--","--","min_samples",":","int","Min","number","of","samples","for","a","leaf","max_samples",":","int","Max","number","of","samples","for","a","leaf",":","return",":","tuple","Contains","a","numpy","array","of","leaf","ids","and","an","array","of","leaf","samples"]
code: def get_leaf_sample_counts(self, min_samples=0, max_samples=None):
      """
      Get the number of samples for each leaf.
  
      There is the option to filter the leaves with samples between min_samples and max_samples.
  
      Parameters
      ----------
      min_samples: int
          Min number of samples for a leaf
      max_samples: int
          Max number of samples for a leaf
  
      :return: tuple
          Contains a numpy array of leaf ids and an array of leaf samples
      """
      max_samples = (
          max_samples
          if max_samples
          else max([node.nsamples() for node in self.leaves])
      )
      leaf_samples = [
          (node.id, node.nsamples())
          for node in self.leaves
          if min_samples <= node.nsamples() <= max_samples
      ]
      x, y = zip(*leaf_samples)
      return np.array(x), np.array(y)
  
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 32 for calling the ShadowDecTree obj's underlying member method code with example usage: obj.get_leaf_sample_counts(min_samples, max_samples) and returns: np,  np