docstr: Check whether the node follows a dirac distribution regarding the given
  class, i.e., if the node is pure regarding the given class.
  
  Parameters
  ----------
  y
      Class of a given sample.
docstr_tok: ["Check","whether","the","node","follows","a","dirac","distribution","regarding","the","given","class",",","i.e.",",","if","the","node","is","pure","regarding","the","given","class",".","Parameters","--","--","--","--","--","y","Class","of","a","given","sample","."]
code: def is_dirac(self, y: base.typing.ClfTarget) -> bool:
      """Check whether the node follows a dirac distribution regarding the given
      class, i.e., if the node is pure regarding the given class.
  
      Parameters
      ----------
      y
          Class of a given sample.
  
      """
  
      return self.n_samples == self.counts[y]
  
imports: from __future__ import annotations
  import collections
  import math
  from river import base, stats
  from river.tree.base import Branch, Leaf
  from river.utils.math import log_sum_2_exp
label_desc: Use image node_id 8 for calling the MondrianNodeClassifier obj's underlying member method code with example usage: obj.is_dirac(y) and returns: unknown