class_docstr: Tree structure representing the hierarchical clusters of BisectingKMeans.
docstr: Iterate over all the cluster leaves in the tree.
docstr_tok: ["Iterate","over","all","the","cluster","leaves","in","the","tree","."]
code: def iter_leaves(self):
      """Iterate over all the cluster leaves in the tree."""
      if self.left is None:
          yield self
      else:
          yield from self.left.iter_leaves()
          yield from self.right.iter_leaves()
  
imports: import warnings
  import numpy
  import scipy.sparse
  from ..base import _fit_context
  from ..utils._openmp_helpers import _openmp_effective_n_threads
  from ..utils._param_validation import StrOptions
  from ..utils.extmath import row_norms
  from ..utils.validation import _check_sample_weight, check_is_fitted, check_random_state
  from ._k_means_common import _inertia_dense, _inertia_sparse
  from ._kmeans import _BaseKMeans, _kmeans_single_elkan, _kmeans_single_lloyd, _labels_inertia_threadpool_limit
label_desc: Use image node_id 4 for calling the _BisectingTree obj's underlying member method code with example usage: obj.iter_leaves() without return types