code: def _pt_shuffle_rec(i, indexes, index_mask, partition_tree, M, pos):
      if i < 0:
          # see if we should include this index in the ordering
          if index_mask[i + M]:
              indexes[pos] = i + M
              return pos + 1
          else:
              return pos
      left = int(partition_tree[i, 0] - M)
      right = int(partition_tree[i, 1] - M)
      if np.random.randn() < 0:
          pos = _pt_shuffle_rec(
              left, indexes, index_mask, partition_tree, M, pos
          )
          pos = _pt_shuffle_rec(
              right, indexes, index_mask, partition_tree, M, pos
          )
      else:
          pos = _pt_shuffle_rec(
              right, indexes, index_mask, partition_tree, M, pos
          )
          pos = _pt_shuffle_rec(
              left, indexes, index_mask, partition_tree, M, pos
          )
      return pos
  
file_path: shap/shap/utils/_clustering.py
imports: import warnings
  import numpy
  import pandas
  import scipy.cluster
  import scipy.spatial
  import sklearn
  from numba import njit
  from ._show_progress import show_progress
label_desc: Use image node_id 3 for calling a global function with example usage: _pt_shuffle_rec(i, indexes, index_mask, partition_tree, M, pos) and returns: pos, unknown, pos