code: def node_predictions(self):
          
          pred = np.zeros(self.data_size)
          for node in self:
              if node.is_terminal:
                  pred[node.indices] = node.node_id
          return pred
docs: Determines which rows fall into which node