def ack(topic, sid): app.logger.debug("Topic recevied is: " + topic) with lock: topic = topic.split('_') client_dict[sid][topic[0]][topic[1]][1] += 1