code: def test_indices_with_labels(self):
      image = np.random.uniform(size=(40, 60))
      i, j = np.mgrid[0:40, 0:60]
      labels = 1 + (i >= 20) + (j >= 30) * 2
      i, j = np.mgrid[-3:4, -3:4]
      footprint = i * i + j * j <= 9
      expected = np.zeros(image.shape, float)
      for imin, imax in ((0, 20), (20, 40)):
          for jmin, jmax in ((0, 30), (30, 60)):
              expected[imin:imax, jmin:jmax] = ndi.maximum_filter(
                  image[imin:imax, jmin:jmax], footprint=footprint
              )
      expected = np.stack(np.nonzero(expected == image), axis=-1)
      expected = expected[np.argsort(image[tuple(expected.T)])[::-1]]
      result = peak.peak_local_max(
          image,
          labels=labels,
          min_distance=1,
          threshold_rel=0,
          footprint=footprint,
          exclude_border=False,
      )
      result = result[np.argsort(image[tuple(result.T)])[::-1]]
      assert (result == expected).all()
  
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 13 for calling the TestPeakLocalMax obj's underlying member method code with example usage: obj.test_indices_with_labels() without return types