code: def strel_worker_3d(self, fn, func):
      matlab_masks = np.load(fetch(fn))
      k = 0
      for arrname in sorted(matlab_masks):
          expected_mask = matlab_masks[arrname]
          actual_mask = func(k)
          if expected_mask.shape == (1,):
              expected_mask = expected_mask[:, np.newaxis]
          # Test center slice for each dimension. This gives a good
          # indication of validity without the need for a 3D reference
          # mask.
          c = int(expected_mask.shape[0] / 2)
          assert_equal(expected_mask, actual_mask[c, :, :])
          assert_equal(expected_mask, actual_mask[:, c, :])
          assert_equal(expected_mask, actual_mask[:, :, c])
          k = k + 1
  
imports: import numpy
  import pytest
  from numpy.testing import assert_equal
  from skimage._shared.testing import fetch
  from skimage.morphology import footprints
label_desc: Use image node_id 5 for calling the TestFootprints obj's underlying member method code with example usage: obj.strel_worker_3d(fn, func) without return types