def remove_dataset_version(
        self, dataset: DatasetRecord, version: str, drop_rows: Optional[bool] = True
    ) -> None:
        """
        Deletes one single dataset version.
        If it was last version, it removes dataset completely
        """
        if not dataset.has_version(version):
            return
        dataset = self.metastore.remove_dataset_version(dataset, version)
        if drop_rows:
            self.warehouse.drop_dataset_rows_table(dataset, version)

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