def _str(val):
    """Ensure that the val is the default str() type for python2 or 3."""
    if str == bytes:
        if isinstance(val, str):
            return val
        else:
            return str(val)
    else:
        if isinstance(val, str):
            return val
        else:
            return str(val, 'ascii')