@defer.inlineCallbacks
    def check_user_was_in_room(self, room_id, user_id):
        member = yield self.state.get_current_state(
            room_id=room_id,
            event_type=EventTypes.Member,
            state_key=user_id
        )
        membership = member.membership if member else None

        if membership not in (Membership.JOIN, Membership.LEAVE):
            raise AuthError(403, "User %s not in room %s" % (
                user_id, room_id
            ))

        if membership == Membership.LEAVE:
            forgot = yield self.store.did_forget(user_id, room_id)
            if forgot:
                raise AuthError(403, "User %s not in room %s" % (
                    user_id, room_id
                ))

        defer.returnValue(member)
Kill the running of ZK update monitor and restart
dataset/ETHPy150Open matrix-org/synapse/synapse/api/auth.py/Auth.check_user_was_in_room--crossover with--dataset/ETHPy150Open pinterest/kingpin/kingpin/zk_update_monitor/zk_update_monitor.py/restart