def METHOD_NAME(self, versioned_txt_data_set):
    """Check the error when attempting to override the data set if the
    corresponding text file for a given save version already exists."""
    versioned_txt_data_set.save(STRING)
    pattern = (
        r"Save path \'.+\' for TextDataSet\(.+\) must "
        r"not exist if versioning is enabled\."
    )
    with pytest.raises(DatasetError, match=pattern):
        versioned_txt_data_set.save(STRING)