code: def _check_input(image, init_level_set):
      """Check that shapes of `image` and `init_level_set` match."""
      check_nD(image, [2, 3])
  
      if len(image.shape) != len(init_level_set.shape):
          raise ValueError(
              "The dimensions of the initial level set do not "
              "match the dimensions of the image."
          )
  
file_path: scikit-image/skimage/segmentation/morphsnakes.py
imports: from itertools import cycle
  import numpy
  from scipy import ndimage
  from .._shared.utils import check_nD
label_desc: Use image node_id 3 for calling a global function with example usage: _check_input(image, init_level_set) without return types