code: def get_node_samples(self):
      # TODO check if we can put this method in the shadow tree
      # maybe to include a message for waiting... or loading bar in case there is big training set
      if self.node_to_samples is not None:
          return self.node_to_samples
  
      node_to_samples = defaultdict(list)
      for i in range(self.X_train.shape[0]):
          path = self.predict_path(self.X_train[i])
          for node in path:
              node_to_samples[node.id].append(i)
  
      self.node_to_samples = node_to_samples
      return self.node_to_samples
  
imports: from abc import ABC
  from collections import defaultdict
  from typing import List, Mapping
  import numpy
  import pyspark
  from dtreeviz.models.shadow_decision_tree import ShadowDecTree
  from dtreeviz.utils import criterion_remapping
  from pyspark.ml.classification import DecisionTreeClassificationModel
  from pyspark.ml.regression import DecisionTreeRegressionModel
label_desc: Use image node_id 13 for calling the ShadowSparkTree obj's underlying member method code with example usage: obj.get_node_samples() and returns: self, self