code: def _check_distances(distances, shape, dtype):
      if distances.shape != shape:
          raise RuntimeError("distances array has wrong shape")
      if distances.dtype != dtype:
          raise RuntimeError(
              f"distances array must have dtype: {dtype}"
          )
  
imports: import math
  import numbers
  import os
  import cupy
  from ._util import _get_inttype
label_desc: Use image node_id 15 for calling a global function with example usage: _check_distances(distances, shape, dtype) without return types