def __retrieve_worker_by_socket(self, socket):
    for (worker_id, worker) in self.connections.items():
        if (worker._socket == socket):
            return self.connections[worker_id]
def __retrieve_worker_by_socket(self, socket):
    for (worker_id, worker) in self.connections.items():
        if (worker._socket == socket):
            return self.connections[worker_id]