def remove_dataset_version(
        self, dataset: DatasetRecord, version: str
    ) -> DatasetRecord:
        """
        Deletes one single dataset version.
        If it was last version, it removes dataset completely.
        """

        Deletes one single dataset version.
        If it was last version, it removes dataset completely.
        
src/datachain/data_storage/metastore.py