def new_connection(self, workerId: str, socket):
    ' Create a mapping structure to establish a bond between a workerId and a socket descriptor.\n\n            Args:\n                workerId: UUID string used to identify workers.\n                socket: Socket descriptor that will be used to send/receive messages from this client.\n\n            Returns:\n                Worker: a worker instance with the corresponding workerId\n        '
    if (workerId not in self.connections):
        self.connections[workerId] = Worker(workerId, socket)
    else:
        worker = self.connections[workerId]
        if (worker.status == WORKER_PROPERTIES.OFFLINE):
            worker._socket = socket
    return self.connections[workerId]
Create a mapping structure to establish a bond between a workerId and a socket descriptor.

Args:
    workerId: UUID string used to identify workers.
    socket: Socket descriptor that will be used to send/receive messages from this client.

Returns:
    Worker: a worker instance with the corresponding workerId
def new_connection(self, workerId: str, socket):
    ' Create a mapping structure to establish a bond between a workerId and a socket descriptor.\n\n            Args:\n                workerId: UUID string used to identify workers.\n                socket: Socket descriptor that will be used to send/receive messages from this client.\n\n            Returns:\n                Worker: a worker instance with the corresponding workerId\n        '
    if (workerId not in self.connections):
        self.connections[workerId] = Worker(workerId, socket)
    else:
        worker = self.connections[workerId]
        if (worker.status == WORKER_PROPERTIES.OFFLINE):
            worker._socket = socket
    return self.connections[workerId]