def _unquote_wrapped_quotes(value):
    """
    Removes wrapping double quotes and any '\\ ' characters. They are usually added to preserve spaces when passing
    value thru shell.

    Examples
    --------
    >>> _unquote_wrapped_quotes('val\\ ue')
    value

    >>> _unquote_wrapped_quotes("hel\\ lo")
    hello

    Parameters
    ----------
    value : str
        Input to unquote

    Returns
    -------
    Unquoted string
    """
    if value and value[0] == value[-1] == '"':
        value = value.strip('"')
    return value.replace('\\ ', ' ').replace('\\"', '"')
