class_docstr: !
  @brief Represents balanced static KD-tree that does not provide services to add and remove nodes after
          initialization.
  @details In the term KD tree, k denotes the dimensionality of the space being represented. Each data point is
            represented as a node in the k-d tree in the form of a record of type node.
  
  There is an example how to create KD-tree:
  @code
      from pyclustering.container.kdtree import kdtree_balanced, kdtree_visualizer
      from pyclustering.utils import read_sample
      from pyclustering.samples.definitions import FCPS_SAMPLES
  
      sample = read_sample(FCPS_SAMPLES.SAMPLE_LSUN)
      tree_instance = kdtree_balanced(sample)
  
      kdtree_visualizer(tree_instance).visualize()
  @endcode
  
  Output result of the example above - figure 1.
  @image html kd_tree_balanced_lsun.png "Fig. 1. Balanced KD-tree for sample 'Lsun'."
  
  @see kdtree
class_docstr_tok: ["!","@","brief","Represents","balanced","static","KD-tree","that","does","not","provide","services","to","add","and","remove","nodes","after","initialization",".","@","details","In","the","term","KD","tree",",","k","denotes","the","dimensionality","of","the","space","being","represented",".","Each","data","point","is","represented","as","a","node","in","the","k-d","tree","in","the","form","of","a","record","of","type","node",".","There","is","an","example","how","to","create","KD-tree",":","@","code","from","pyclustering.container.kdtree","import","kdtree_balanced",",","kdtree_visualizer","from","pyclustering.utils","import","read_sample","from","pyclustering.samples.definitions","import","FCPS_SAMPLES","sample","=","read_sample","(","FCPS_SAMPLES.SAMPLE_LSUN",")","tree_instance","=","kdtree_balanced","(","sample",")","kdtree_visualizer","(","tree_instance",")",".visualize","(",")","@","endcode","Output","result","of","the","example","above","-","figure","1",".","@","image","html","kd_tree_balanced_lsun.png","``","Fig",".","1",".","Balanced","KD-tree","for","sample","'Lsun","'",".","''","@","see","kdtree"]
docstr: !
  @brief Returns list of neighbors such as tuple (distance, node) that is located in area that is covered by distance.
  
  @param[in] point (list): Coordinates that is considered as centroid for searching
  @param[in] distance (double): Distance from the center where searching is performed.
  @param[in] sqrt_distance (double): Square distance from the center where searching is performed.
  @param[in] node_head (node): Node from that searching is performed.
  @param[in|out] best_nodes (list): List of founded nodes.
docstr_tok: ["!","@","brief","Returns","list","of","neighbors","such","as","tuple","(","distance",",","node",")","that","is","located","in","area","that","is","covered","by","distance",".","@","param","[","in","]","point","(","list",")",":","Coordinates","that","is","considered","as","centroid","for","searching","@","param","[","in","]","distance","(","double",")",":","Distance","from","the","center","where","searching","is","performed",".","@","param","[","in","]","sqrt_distance","(","double",")",":","Square","distance","from","the","center","where","searching","is","performed",".","@","param","[","in","]","node_head","(","node",")",":","Node","from","that","searching","is","performed",".","@","param","[","in|out","]","best_nodes","(","list",")",":","List","of","founded","nodes","."]
code: def __recursive_nearest_nodes(
      self, point, distance, sqrt_distance, node_head, best_nodes
  ):
      """!
      @brief Returns list of neighbors such as tuple (distance, node) that is located in area that is covered by distance.
  
      @param[in] point (list): Coordinates that is considered as centroid for searching
      @param[in] distance (double): Distance from the center where searching is performed.
      @param[in] sqrt_distance (double): Square distance from the center where searching is performed.
      @param[in] node_head (node): Node from that searching is performed.
      @param[in|out] best_nodes (list): List of founded nodes.
  
      """
  
      if node_head.right is not None:
          minimum = node_head.data[node_head.disc] - distance
          if point[node_head.disc] >= minimum:
              self.__recursive_nearest_nodes(
                  point,
                  distance,
                  sqrt_distance,
                  node_head.right,
                  best_nodes,
              )
  
      if node_head.left is not None:
          maximum = node_head.data[node_head.disc] + distance
          if point[node_head.disc] < maximum:
              self.__recursive_nearest_nodes(
                  point,
                  distance,
                  sqrt_distance,
                  node_head.left,
                  best_nodes,
              )
  
      candidate_distance = euclidean_distance_square(
          point, node_head.data
      )
      if candidate_distance <= sqrt_distance:
          best_nodes.append((candidate_distance, node_head))
  
imports: import numpy
  import matplotlib.pyplot
  from pyclustering.utils import euclidean_distance_square, find_left_element
label_desc: Use image node_id 11 for calling the kdtree_balanced obj's underlying member method code with example usage: obj.__recursive_nearest_nodes(point, distance, sqrt_distance, node_head, best_nodes) without return types