def unescape(value, escape='\\'):
    """
    Unescapes the provided string value using the provided escape
    character as the reference for the unescape operation.

    This is considered to be a very expensive operation and so it
    should be used carefully.

    :type value: String
    :param value: The string value that is going to be unescape.
    :rtype: String
    :return: The final unescaped value.
    """
    result = []
    iterator = iter(value)
    for char in iterator:
        if char == escape:
            try:
                result.append(next(iterator))
            except StopIteration:
                result.append(escape)
        else:
            result.append(char)
    return ''.join(result)
