def _remove_client_present(self, client):
        id_ = client.id_
        if id_ is None or self.present not in id_:
            # This is possible if _remove_client_present() is invoked
            # before the minion's id is validated.
            return

        clients = self.present[id_]
        if client not in clients:
            # Since _remove_client_present() is potentially called from
            # _stream_read() and/or publish_payload(), it is possible for
            # it to be called twice, in which case we will get here.
            # This is not an abnormal case, so no logging is required.
            return

        clients.remove(client)
        if len(clients) == 0:
            del self.present[id_]
            if self.presence_events:
                data = {'new': [],
                        'lost': [id_]}
                self.event.fire_event(
                    data,
                    salt.utils.event.tagify('change', 'presence')
                )
                data = {'present': list(self.present.keys())}
                self.event.fire_event(
                    data,
                    salt.utils.event.tagify('present', 'presence')
                )
dataset/ETHPy150Open saltstack/salt/salt/transport/tcp.py/PubServer._remove_client_present/swapped operands of `not in`