def _purge_sstables(self, endpoint, kept_components):
        """Deletes the sstables for the current keyspace and host
        that are not listed in ``kept_components``. 
        
        Returns a list of the paths deleted.
        """
        
        ks_dir = cassandra.BackupFile.backup_keyspace_dir(self.args.host, 
            self.args.keyspace)
        
        set_kept_files = frozenset(
            component.backup_file_name
            for component in kept_components
        )
        
        # Step 3 - delete files not in the keep list.
        deleted_files = []
        for file_path in endpoint.iter_dir(ks_dir, recursive=True):
            _, file_name = os.path.split(file_path)

            if set_kept_files in file_name:
                self.log.debug("Keeping file %s", file_path)
            else:
                self.log.debug("Deleting file %s", file_path)
                deleted_files.append(endpoint.remove_file_with_meta(
                    file_path, dry_run=self.args.dry_run))
        return deleted_files
dataset/ETHPy150Open amorton/cassback/cassback/subcommands/purge_subcommand.py/PurgeSubCommand._purge_sstables/swapped operands of `in`