class_docstr: A tree node class for representing a cluster.
  
  Leaf nodes correspond to original observations, while non-leaf nodes
  correspond to non-singleton clusters.
  
  The `to_tree` function converts a matrix returned by the linkage
  function into an easy-to-use tree representation.
  
  All parameter names are also attributes.
  
  Parameters
  ----------
  id : int
      The node id.
  left : ClusterNode instance, optional
      The left child tree node.
  right : ClusterNode instance, optional
      The right child tree node.
  dist : float, optional
      Distance for this cluster in the linkage matrix.
  count : int, optional
      The number of samples in this cluster.
  
  See Also
  --------
  to_tree : for converting a linkage matrix ``Z`` into a tree object.
class_docstr_tok: ["A","tree","node","class","for","representing","a","cluster",".","Leaf","nodes","correspond","to","original","observations",",","while","non-leaf","nodes","correspond","to","non-singleton","clusters",".","The","`","to_tree","`","function","converts","a","matrix","returned","by","the","linkage","function","into","an","easy-to-use","tree","representation",".","All","parameter","names","are","also","attributes",".","Parameters","--","--","--","--","--","id",":","int","The","node","id",".","left",":","ClusterNode","instance",",","optional","The","left","child","tree","node",".","right",":","ClusterNode","instance",",","optional","The","right","child","tree","node",".","dist",":","float",",","optional","Distance","for","this","cluster","in","the","linkage","matrix",".","count",":","int",",","optional","The","number","of","samples","in","this","cluster",".","See","Also","--","--","--","--","to_tree",":","for","converting","a","linkage","matrix","``","Z","``","into","a","tree","object","."]
docstr: The identifier of the target node.
  
  For ``0 <= i < n``, `i` corresponds to original observation i.
  For ``n <= i < 2n-1``, `i` corresponds to non-singleton cluster formed
  at iteration ``i-n``.
  
  Returns
  -------
  id : int
      The identifier of the target node.
docstr_tok: ["The","identifier","of","the","target","node",".","For","``","0","<","=","i","<","n","``",",","`","i","`","corresponds","to","original","observation","i",".","For","``","n","<","=","i","<","2n-1","``",",","`","i","`","corresponds","to","non-singleton","cluster","formed","at","iteration","``","i-n","``",".","Returns","--","--","--","-","id",":","int","The","identifier","of","the","target","node","."]
code: def get_id(self):
      """
      The identifier of the target node.
  
      For ``0 <= i < n``, `i` corresponds to original observation i.
      For ``n <= i < 2n-1``, `i` corresponds to non-singleton cluster formed
      at iteration ``i-n``.
  
      Returns
      -------
      id : int
          The identifier of the target node.
  
      """
      return self.id
  
imports: import warnings
  import bisect
  from collections import deque
  import numpy
  from .None import _hierarchy, _optimal_leaf_ordering
  import scipy.spatial.distance
  from scipy._lib._array_api import array_namespace, as_xparray, copy
  from scipy._lib._disjoint_set import DisjointSet
label_desc: Use image node_id 5 for calling the ClusterNode obj's underlying member method code with example usage: obj.get_id() and returns: self