code: def test_distance_transform_edt_basic(
      self,
      shape,
      sampling,
      return_distances,
      return_indices,
      density,
      block_params,
  ):
      # Note: Not using @numpy_cupy_allclose because indices array
      #       comparisons need a custom function to check.
      if not (return_indices or return_distances):
          return
  
      kwargs_scipy = dict(
          sampling=sampling,
          return_distances=return_distances,
          return_indices=return_indices,
      )
      kwargs_cucim = copy.copy(kwargs_scipy)
      kwargs_cucim["block_params"] = block_params
      if density == "single_point":
          img = cupy.ones(shape, dtype=bool)
          img[tuple(s // 2 for s in shape)] = 0
      else:
          img = self._binary_image(shape, pct_true=density)
  
      dt_gpu = cupyx.scipy.ndimage.distance_transform_edt
      dt_cpu = scipy.ndimage.distance_transform_edt
      out = dt_gpu(img, **kwargs_cucim)
      expected = dt_cpu(cupy.asnumpy(img), **kwargs_scipy)
      if sampling is None:
          target_pct = 95
      else:
          target_pct = 90
      if return_indices and return_distances:
          assert len(out) == 2
          cupy.testing.assert_allclose(out[0], expected[0], rtol=1e-6)
          # May differ at a small % of coordinates where multiple points were
          # equidistant.
          self._assert_percentile_equal(
              out[1], expected[1], pct=target_pct
          )
      elif return_distances:
          cupy.testing.assert_allclose(out, expected, rtol=1e-6)
      elif return_indices:
          self._assert_percentile_equal(out, expected, pct=target_pct)
  
imports: import copy
  import numpy
  import pytest
  import cupy
  from cupy import testing
  import cupyx.scipy.ndimage
label_desc: Use image node_id 3 for calling the TestDistanceTransform obj's underlying member method code with example usage: obj.test_distance_transform_edt_basic(shape, sampling, return_distances, return_indices, density, block_params) without return types