code: def rptree_leaf_array_parallel(rp_forest):
      max_leaf_size = np.max(
          [rp_tree.leaf_size for rp_tree in rp_forest]
      )
      result = joblib.Parallel(n_jobs=-1, require="sharedmem")(
          joblib.delayed(get_leaves_from_tree)(rp_tree, max_leaf_size)
          for rp_tree in rp_forest
      )
      return result
  
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 17 for calling a global function with example usage: rptree_leaf_array_parallel(rp_forest) and returns: result