def _purge_manifests(self, endpoint,  keep_manifests):
        """Deletes all manifests for the current keyspace and host not in 
        the list of ``kept_manifests``
        
        Returns a list of the paths deleted. 
        """
        
        keep_paths = frozenset(
            manifest.backup_path
            for manifest in keep_manifests
        )
        self.log.debug("Keeping manifsest paths {keep_paths}".format(
            keep_paths=keep_paths))
                    
        keyspace_dir = cassandra.KeyspaceBackup.backup_keyspace_dir(
            self.args.keyspace)
        deleted = []
        for manifest_path in endpoint.iter_dir(keyspace_dir, recursive=True):
            if keep_paths in manifest_path:
                self.log.debug("Keeping manifest %s", manifest_path) 
            else:
                self.log.debug("Purging manifest %s", manifest_path)
                deleted.append(endpoint.remove_file(manifest_path, 
                    dry_run=self.args.dry_run))
        return deleted
dataset/ETHPy150Open amorton/cassback/cassback/subcommands/purge_subcommand.py/PurgeSubCommand._purge_manifests/swapped operands of `in`