def to_native_string(value, encoding):
    """Convert bytes from Lua to "Native" strings, which wsgi likes.

    In Python 3 these are 'str' and not 'bytes'.

    In Python 2 these are 'str' and not 'unicode'"""
    assert isinstance(value, bytes), repr(value)
    return str(value.decode(encoding))
