def remove(self, socket) -> str:
    ' Remove a socket descriptor from mapping structure. It will be used when the socket connection is closed.\n\n            Args:\n                socket: socket descriptor used to send/receive messages.\n\n            Returns:\n                workerId: Worker id linked to that connection.\n        '
    worker = self.__retrieve_worker_by_socket(socket)
    if worker:
        self.connections[worker._id]._socket = None
        self.connections[worker._id].connected_nodes = []
        return worker._id
Remove a socket descriptor from mapping structure. It will be used when the socket connection is closed.

Args:
    socket: socket descriptor used to send/receive messages.

Returns:
    workerId: Worker id linked to that connection.
def remove(self, socket) -> str:
    ' Remove a socket descriptor from mapping structure. It will be used when the socket connection is closed.\n\n            Args:\n                socket: socket descriptor used to send/receive messages.\n\n            Returns:\n                workerId: Worker id linked to that connection.\n        '
    worker = self.__retrieve_worker_by_socket(socket)
    if worker:
        self.connections[worker._id]._socket = None
        self.connections[worker._id].connected_nodes = []
        return worker._id