code: def test_num_peaks3D(self):
      # Issue 1354: the old code only hold for 2D arrays
      # and this code would die with IndexError
      image = np.zeros((10, 10, 100))
      image[5, 5, ::5] = np.arange(20)
      peaks_limited = peak.peak_local_max(
          image, min_distance=1, num_peaks=2
      )
      assert len(peaks_limited) == 2
  
imports: import itertools
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal, assert_equal
  from scipy import ndimage
  from skimage._shared._warnings import expected_warnings
  from skimage.feature import peak
label_desc: Use image node_id 11 for calling the TestPeakLocalMax obj's underlying member method code with example usage: obj.test_num_peaks3D() without return types