def _strip_double_quotes(string: str) -> str:
    """Removes encapsulating double quotes, if there are some.

    Ignores non-encapsulating double quotes (one side only or inside).

    Args:
        string: The string to be pruned.

    Returns:
        The pruned string without encapsulating double quotes.
    """
    if not string or string == '""':
        return ""
    if len(string) >= 2 and string[0] == '"' and string[-1] == '"':
        return string[1:-1]
    return string