def METHOD_NAME(
    self, json_data_set, versioned_json_data_set, dummy_data
):
    """Check the error when attempting to save a versioned dataset on top of an
    already existing (non-versioned) dataset."""
    json_data_set.save(dummy_data)
    assert json_data_set.exists()
    assert json_data_set._filepath == versioned_json_data_set._filepath
    pattern = (
        f"(?=.*file with the same name already exists in the directory)"
        f"(?=.*{versioned_json_data_set._filepath.parent.as_posix()})"
    )
    with pytest.raises(DatasetError, match=pattern):
        versioned_json_data_set.save(dummy_data)
    # Remove non-versioned dataset and try again
    Path(json_data_set._filepath.as_posix()).unlink()
    versioned_json_data_set.save(dummy_data)
    assert versioned_json_data_set.exists()