code: def test_centroid(dtype):
      image = np.zeros((20, 20), dtype=dtype)
      image[14, 14:16] = 1
      image[15, 14:16] = 1 / 3
      image_centroid = centroid(image)
      if dtype == np.float16:
          rtol = 1e-3
      elif dtype == np.float32:
          rtol = 1e-5
      else:
          rtol = 1e-7
      assert_allclose(image_centroid, (14.25, 14.5), rtol=rtol)
  
imports: import itertools
  import numpy
  import pytest
  from scipy import ndimage
  from skimage import draw
  from skimage._shared import testing
  from skimage._shared.testing import assert_allclose, assert_almost_equal, assert_equal
  from skimage._shared.utils import _supported_float_type
  from skimage.measure import centroid, inertia_tensor, inertia_tensor_eigvals, moments, moments_central, moments_coords, moments_coords_central, moments_hu, moments_normalized
label_desc: Use image node_id 14 for calling a global function with example usage: test_centroid(dtype) without return types