Removes a given key from the given .env

    If the .env path given doesn't exist, fails
    If the given key doesn't exist in the .env, fails

    :param dotenv_path: env path
    :param key_to_unset: value
    :param quote_mode: quote value in .env file
    :param verbose: verbosity flag, raise warning if path does not exist
    :return: tuple (fail/win, key)

def unset_key(dotenv_path, key_to_unset, quote_mode='always', verbose=False):
    """
    Removes a given key from the given .env

    If the .env path given doesn't exist, fails
    If the given key doesn't exist in the .env, fails

    :param dotenv_path: env path
    :param key_to_unset: value
    :param quote_mode: quote value in .env file
    :param verbose: verbosity flag, raise warning if path does not exist
    :return: tuple (fail/win, key)
    """
    key_to_unset = str(key_to_unset)
    if not os.path.exists(dotenv_path):
        if verbose:
            warnings.warn(f"Can't delete from {dotenv_path}, it doesn't exist.")
        return None, key_to_unset
    dotenv_as_dict = dotenv_values(dotenv_path)
    if key_to_unset in dotenv_as_dict:
        dotenv_as_dict.pop(key_to_unset, None)
    else:
        if verbose:
            warnings.warn(f"Key {key_to_unset} not removed from {dotenv_path}, key doesn't exist.")
        return None, key_to_unset

    success = flatten_and_write(dotenv_path, dotenv_as_dict, quote_mode)
    return success, key_to_unset