code: def _offsets_diamond(ndim):
      offsets = np.zeros((2 * ndim, ndim))
      for vertex, (axis, offset) in enumerate(
          product(range(ndim), (-0.5, 0.5))
      ):
          offsets[vertex, axis] = offset
      return offsets
  
file_path: scikit-image/skimage/morphology/convex_hull.py
imports: from itertools import product
  import numpy
  from scipy.spatial import ConvexHull, QhullError
  from ..measure.pnpoly import grid_points_in_poly
  from ._convex_hull import possible_hull
  from ..measure._label import label
  from ..util import unique_rows
  from .._shared.utils import warn
label_desc: Use image node_id 1 for calling a global function with example usage: _offsets_diamond(ndim) and returns: offsets