Return all the active message UIDs that have the ``\\Deleted`` flag.

        Args:
            seq_set: The sequence set of the possible messages.
            selected: The selected mailbox session.
192192
async def find_deleted(self, seq_set: SequenceSet,
                           selected: SelectedMailbox) -> Sequence[int]:
        
        session_flags = selected.session_flags
        return [msg.uid async for _, msg in self.find(seq_set, selected)
                if Deleted in msg.get_flags(session_flags)]
555648
def get_all_messages_in_thread(self, participant_id, thread_id, check_who_read=True):
        
        try:
            messages = Message.objects.filter(thread__id=thread_id).\
                order_by('-id').\
                select_related('thread').\
                prefetch_related('thread__participation_set', 'thread__participation_set__participant')
        except Exception:
            return Message.objects.none()

        messages = self.check_who_read(messages)
        return messages
1350982
def filter_labels(sent: Sequence[str], labels: Set[str] = None) -> List[str]:
    

    if labels:
        return [tok for tok in sent if tok in labels]
    return list(sent)
890845
def unique_iter(seq):
    
    seen = set()
    return [x for x in seq if x not in seen and not seen.add(x)]
367928
def toc(self):
        
        if not self.activated:
            return []
        for exe in self.exes:
            for array in exe.arg_arrays:
                array.wait_to_read()
            for array in exe.aux_arrays:
                array.wait_to_read()
        for exe in self.exes:
            for name, array in zip(exe._symbol.list_arguments(), exe.arg_arrays):
                if self.re_prog.match(name):
                    self.queue.append((self.step, name, self.stat_func(array)))
            for name, array in zip(exe._symbol.list_auxiliary_states(), exe.aux_arrays):
                if self.re_prog.match(name):
                    self.queue.append((self.step, name, self.stat_func(array)))
        self.activated = False
        res = []
        if self.sort:
            self.queue.sort(key=lambda x: x[1])
        for n, k, v_list in self.queue:
            if isinstance(v_list, NDArray):
                v_list = [v_list]
            assert isinstance(v_list, list)
            s = ''
            for v in v_list:
                assert isinstance(v, NDArray)
                if v.shape == (1,):
                    s += str(v.asscalar()) + '\t'
                else:
                    s += str(v.asnumpy()) + '\t'
            res.append((n, k, s))
        self.queue = []
        return res
957599
def delete_all(self, user=None):
        
        qs = self.active()
        if user:
            qs = qs.filter(recipient=user)

        soft_delete = getattr(settings, 'NOTIFY_SOFT_DELETE', True)

        if soft_delete:
            qs.update(deleted=True)
        else:
            qs.delete()
965695
def get(self, uid: int) -> FrozenSet[Flag]:
        
        recent = _recent_set if uid in self._recent else frozenset()
        flags = self._flags.get(uid)
        return recent if flags is None else (flags | recent)
1324614
def runtime_cleanup(self, selected_uids):
        
        self.run_count = 0
        self.num_nodes = len(selected_uids)
        self.node_results = []
        self._skipped_children = {}
        self._skipped_children = {}
        self._raise_next_tick = None
1238089
public ResultSet getGeneratedKeys(Protocol protocol) {
    if (insertId == 0) {
      return SelectResultSet.createEmptyResultSet();
    }

    if (updateCount > 1) {
      long[] insertIds = new long[(int) updateCount];
      for (int i = 0; i < updateCount; i++) {
        insertIds[i] = insertId + i * autoIncrement;
      }
      return SelectResultSet.createGeneratedData(insertIds, protocol, true);
    }

    return SelectResultSet.createGeneratedData(new long[]{insertId}, protocol, true);
  }
914439
def _message_queryset(self, include_read=False):
        
        expire = timezone.now()


        qs = PersistentMessage.objects.\
        filter(user=self.get_user()).\
        filter(Q(expires=None) | Q(expires__gt=expire))
        if not include_read:
            qs = qs.exclude(read=True)
        return qs
231106
def dedupe_list(seq):
    
    seen = set()
    return [x for x in seq if not (x in seen or seen.add(x))]
1130970
def uniq(seq):
    
    seen = set()
    return [x for x in seq if str(x) not in seen and not seen.add(str(x))]
1084717
def get_activations(self):
        """"""
        res = (self.added, self.removed)

        self.added = set()
        self.removed = set()

        return res
102982
def get_all_if_deleted(self):
        

        with self._lock:
            results = {}
            for add, fut in self._state.items():
                if self._contains_and_deleted(add):
                    results[add] = fut.result()
            return results
1006917
def is_sequential(self):
        
        seq_ids = tuple(int(residue["Seq_ID"]) for residue in self)
        return seq_ids == tuple(range(int(seq_ids[0]), int(seq_ids[-1])+1))
862494
def response_set
      extracted_sets = []

      unless self.qp_response_set.nil?
        self.qp_response_set.each do |set|   
          extracted_sets.push(ResponseSet.new(set))
        end           
      end

      return extracted_sets
    end
24813
def _find_set_members(set):
    '''
    
    '''

    cmd = '{0} list {1}'.format(_ipset_cmd(), set)
    out = __salt__['cmd.run_all'](cmd, python_shell=False)

    if out['retcode'] > 0:
        # Set doesn't exist return false
        return False

    _tmp = out['stdout'].split('\n')
    members = []
    startMembers = False
    for i in _tmp:
        if startMembers:
            members.append(i)
        if 'Members:' in i:
            startMembers = True
    return members