docstr: Assert a target percentage of arr1 and arr2 are equal.
docstr_tok: ["Assert","a","target","percentage","of","arr1","and","arr2","are","equal","."]
code: def _assert_percentile_equal(self, arr1, arr2, pct=95):
      """Assert a target percentage of arr1 and arr2 are equal."""
      pct_mismatch = (100 - pct) / 100
      arr1 = cupy.asnumpy(arr1)
      arr2 = cupy.asnumpy(arr2)
      mismatch = numpy.sum(arr1 != arr2) / arr1.size
      assert mismatch < pct_mismatch
  
imports: import copy
  import numpy
  import pytest
  import cupy
  from cupy import testing
  import cupyx.scipy.ndimage
label_desc: Use image node_id 2 for calling the TestDistanceTransform obj's underlying member method code with example usage: obj._assert_percentile_equal(arr1, arr2, pct) without return types