def unicode_unescape(value):
    """Convert escaped unicode and Python backslash values in str

    Args:
        value (str): contains escaped characters
    Returns:
        str: unescaped string
    """
    if hasattr(value, 'decode'):
        # py2
        return value.decode('string_escape')
    # py3
    return value.encode('utf-8').decode('unicode-escape')