code: def _singlenode_searchlight(
      data, msk, mysl_rad, bcast_var, extra_params
  ):
      """Run searchlight function on block data in parallel.
  
      `extra_params` contains:
  
      - Searchlight function.
      - `Shape` mask.
      - Minimum active voxels proportion required to run the searchlight
        function.
      """
  
      voxel_fn = extra_params[0]
      shape_mask = extra_params[1]
      min_active_voxels_proportion = extra_params[2]
      outmat = np.empty(msk.shape, dtype=object)
      if mysl_rad > 0:
          outmat = outmat[
              mysl_rad:-mysl_rad, mysl_rad:-mysl_rad, mysl_rad:-mysl_rad
          ]
      for i in range(0, outmat.shape[0]):
          for j in range(0, outmat.shape[1]):
              for k in range(0, outmat.shape[2]):
                  if msk[i + mysl_rad, j + mysl_rad, k + mysl_rad]:
                      searchlight_slice = np.s_[
                          i : i + 2 * mysl_rad + 1,
                          j : j + 2 * mysl_rad + 1,
                          k : k + 2 * mysl_rad + 1,
                      ]
                      voxel_fn_mask = (
                          msk[searchlight_slice] * shape_mask
                      )
                      if (
                          min_active_voxels_proportion == 0
                          or np.count_nonzero(voxel_fn_mask)
                          / voxel_fn_mask.size
                          > min_active_voxels_proportion
                      ):
                          outmat[i, j, k] = voxel_fn(
                              [
                                  subject[searchlight_slice]
                                  for subject in data
                              ],
                              msk[searchlight_slice] * shape_mask,
                              mysl_rad,
                              bcast_var,
                          )
      return outmat
  
imports: from multiprocessing import Pool
  import numpy
  from mpi4py import MPI
  from scipy.spatial.distance import cityblock, euclidean
  from ..utils.utils import usable_cpu_count
label_desc: Use image node_id 1 for calling a global function with example usage: _singlenode_searchlight(data, msk, mysl_rad, bcast_var, extra_params) and returns: outmat