code: def _check_input(image, init_level_set):
      
      if not image.ndim in [2, 3]:
          raise ValueError("`image` must be a 2 or 3-dimensional array.")
  
      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.")
docs: Check that shapes of `image` and `init_level_set` match.