class_docstr: Distributed Searchlight
  
  Run a user-defined function over each voxel in a multi-subject
  dataset.
  
  Optionally, users can define a block function which runs over
  larger portions of the volume called blocks.
  
  Parameters
  ----------
  
  sl_rad: radius, in voxels, of the sphere inscribed in the
             searchlight cube, not counting the center voxel
  
  max_blk_edge: max edge length, in voxels, of the 3D block
  
  shape: brainiak.searchlight.searchlight.Shape indicating the
  shape in voxels of the searchlight region
  
  min_active_voxels_proportion: float
      If a searchlight region does not have more than this minimum
      proportion of active voxels in the mask, it is not processed by the
      searchlight function. The mask used for the test is the
      intersection of the global (brain) mask and the `Shape` mask. The
      seed (central) voxel of the searchlight region is taken into
      consideration.
class_docstr_tok: ["Distributed","Searchlight","Run","a","user-defined","function","over","each","voxel","in","a","multi-subject","dataset",".","Optionally",",","users","can","define","a","block","function","which","runs","over","larger","portions","of","the","volume","called","blocks",".","Parameters","--","--","--","--","--","sl_rad",":","radius",",","in","voxels",",","of","the","sphere","inscribed","in","the","searchlight","cube",",","not","counting","the","center","voxel","max_blk_edge",":","max","edge","length",",","in","voxels",",","of","the","3D","block","shape",":","brainiak.searchlight.searchlight.Shape","indicating","the","shape","in","voxels","of","the","searchlight","region","min_active_voxels_proportion",":","float","If","a","searchlight","region","does","not","have","more","than","this","minimum","proportion","of","active","voxels","in","the","mask",",","it","is","not","processed","by","the","searchlight","function",".","The","mask","used","for","the","test","is","the","intersection","of","the","global","(","brain",")","mask","and","the","`","Shape","`","mask",".","The","seed","(","central",")","voxel","of","the","searchlight","region","is","taken","into","consideration","."]
code: def __init__(
      self,
      sl_rad=1,
      max_blk_edge=10,
      shape=Cube,
      min_active_voxels_proportion=0,
  ):
      assert sl_rad >= 0, "sl_rad should not be negative"
      assert max_blk_edge > 0, "max_blk_edge should be positive"
      self.sl_rad = sl_rad
      self.max_blk_edge = max_blk_edge
      self.min_active_voxels_proportion = min_active_voxels_proportion
      self.comm = MPI.COMM_WORLD
      self.shape = shape(sl_rad).mask_
      self.bcast_var = None
  
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 to create a new Searchlight object  with example: obj = Searchlight(sl_rad, max_blk_edge, shape, min_active_voxels_proportion)