code: def test_distance_transform_inplace_distance(
      self, xp, scp, ndim, sampling
  ):
      img = self._binary_image((32,) * ndim, xp=xp, pct_true=80)
      distances = xp.empty(img.shape, dtype=xp.float64)
      if sampling == "iso":
          sampling = (1.5,) * ndim
      elif sampling == "aniso":
          sampling = tuple(range(1, ndim + 1))
      scp.ndimage.distance_transform_edt(
          img, sampling=sampling, distances=distances
      )
      return distances
  
imports: import copy
  import numpy
  import pytest
  import cupy
  from cupy import testing
  import cupyx.scipy.ndimage
label_desc: Use image node_id 10 for calling the TestDistanceTransform obj's underlying member method code with example usage: obj.test_distance_transform_inplace_distance(xp, scp, ndim, sampling) and returns: distances