code: def _init_level_set(init_level_set, image_shape):
      
      if isinstance(init_level_set, str):
          if init_level_set == 'checkerboard':
              res = checkerboard_level_set(image_shape)
          elif init_level_set == 'circle':
              res = circle_level_set(image_shape)
          else:
              raise ValueError("`init_level_set` not in "
                               "['checkerboard', 'circle']")
      else:
          res = init_level_set
      return res
docs: Auxiliary function for initializing level sets with a string.
  
      If `init_level_set` is not a string, it is returned as is.