code: def recursive_convert_sparse(
      tree,
      hyperplanes,
      offsets,
      children,
      indices,
      node_num,
      leaf_start,
      tree_node,
  ):
      if tree.children[tree_node][0] < 0:
          leaf_end = leaf_start + len(tree.indices[tree_node])
          children[node_num, 0] = -leaf_start
          children[node_num, 1] = -leaf_end
          indices[leaf_start:leaf_end] = tree.indices[tree_node]
          return node_num, leaf_end
      else:
          hyperplanes[
              node_num, :, : tree.hyperplanes[tree_node].shape[1]
          ] = tree.hyperplanes[tree_node]
          offsets[node_num] = tree.offsets[tree_node]
          children[node_num, 0] = node_num + 1
          old_node_num = node_num
          node_num, leaf_start = recursive_convert_sparse(
              tree,
              hyperplanes,
              offsets,
              children,
              indices,
              node_num + 1,
              leaf_start,
              tree.children[tree_node][0],
          )
          children[old_node_num, 1] = node_num + 1
          node_num, leaf_start = recursive_convert_sparse(
              tree,
              hyperplanes,
              offsets,
              children,
              indices,
              node_num + 1,
              leaf_start,
              tree.children[tree_node][1],
          )
          return node_num, leaf_start
  
imports: from warnings import warn
  import locale
  import numpy
  import numba
  import scipy.sparse
  from pynndescent.sparse import sparse_mul, sparse_diff, sparse_sum, arr_intersect, sparse_dot_product
  from pynndescent.utils import tau_rand_int, norm
  import joblib
  from collections import namedtuple
label_desc: Use image node_id 20 for calling a global function with example usage: recursive_convert_sparse(tree, hyperplanes, offsets, children, indices, node_num, leaf_start, tree_node) and returns: node_num,  leaf_end, node_num,  leaf_start