code: def ball_sfn(data, msk, myrad, bcast_var):
      x, y, z = np.mgrid[
          -myrad : myrad + 1, -myrad : myrad + 1, -myrad : myrad + 1
      ]
      correct_mask = (
          np.square(x) + np.square(y) + np.square(z) <= myrad**2
      )
      assert not np.any(msk[~Ball(3).mask_])
      if np.all(correct_mask == msk):
          return 1.0
      return None
  
file_path: brainiak/tests/searchlight/test_searchlight.py
imports: from collections import namedtuple
  import numpy
  from mpi4py import MPI
  import conftest
  from brainiak.searchlight.searchlight import Searchlight
  from brainiak.searchlight.searchlight import Diamond, Ball
label_desc: Use image node_id 6 for calling a global function with example usage: ball_sfn(data, msk, myrad, bcast_var) and returns: None, int