def sentinel(name):
  """Create a sentinel object.

  The sentinel's type is a class with the given name that has no behavior except
  that it's string representation is also the given name. The sentinel is
  intended for use where some special behavior is required where there is no
  acceptable special value in the type of an argument. An identity check (x is
  SENTINEL) can be used to check for the sentinel.
  """
  return type(name, (), {
      '__repr__': lambda _: name,
      '__copy__': lambda self: self,
      '__deepcopy__': lambda self, _: self,
  })()