def is_valid_next_version(self, version: str) -> bool:
        """
        Checks if a number can be a valid next latest version for dataset.
        The only rule is that it cannot be lower than current latest version
        """
        return not (
            self.latest_version
            and semver.value(self.latest_version) >= semver.value(version)
        )

        Checks if a number can be a valid next latest version for dataset.
        The only rule is that it cannot be lower than current latest version
        
src/datachain/dataset.py