def update_dataset_status(
        self,
        dataset: DatasetRecord,
        status: int,
        version: Optional[str] = None,
        error_message="",
        error_stack="",
        script_output="",
    ) -> DatasetRecord:
        """Updates dataset status and appropriate fields related to status."""
Updates dataset status and appropriate fields related to status.
src/datachain/data_storage/metastore.py