def assert_native(n):
    """Ensure that input is a native :class:`str`."""
    if not isinstance(n, str):
        raise TypeError('n must be a native str (got %s)' % type(n).__name__)
Ensure that input is a native :class:`str`.
cherrypy/_cpcompat.py