code: def _init_level_set(init_level_set, image_shape):
      """Auxiliary function for initializing level sets with a string.
  
      If `init_level_set` is not a string, it is returned as is.
      """
      if isinstance(init_level_set, str):
          if init_level_set == "checkerboard":
              res = checkerboard_level_set(image_shape)
          elif init_level_set == "disk":
              res = disk_level_set(image_shape)
          else:
              raise ValueError(
                  "`init_level_set` not in " "['checkerboard', 'disk']"
              )
      else:
          res = init_level_set
      return res
  
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 4 for calling a global function with example usage: _init_level_set(init_level_set, image_shape) and returns: res