class_docstr: A node in a shadow tree. Each node has left and right pointers to child nodes, if any.
  As part of tree construction process, the samples examined at each decision node or at each leaf node are
  saved into field node_samples.
class_docstr_tok: ["A","node","in","a","shadow","tree",".","Each","node","has","left","and","right","pointers","to","child","nodes",",","if","any",".","As","part","of","tree","construction","process",",","the","samples","examined","at","each","decision","node","or","at","each","leaf","node","are","saved","into","field","node_samples","."]
docstr: Used for classification only.
  
  Returns the count values for each class.
docstr_tok: ["Used","for","classification","only",".","Returns","the","count","values","for","each","class","."]
code: def n_sample_classes(self):
      """Used for classification only.
  
      Returns the count values for each class.
      """
  
      samples = np.array(self.samples())
      node_values = [0] * len(self.shadow_tree.class_names)
      if samples.size == 0:
          return node_values
      node_y_data = self.shadow_tree.y_train[samples]
      unique, counts = np.unique(node_y_data, return_counts=True)
  
      for i in range(len(unique)):
          node_values[unique[i]] = counts[i]
  
      return node_values
  
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 7 for calling the ShadowDecTreeNode obj's underlying member method code with example usage: obj.n_sample_classes() and returns: node_values, node_values