def _handle_message(self, message):
        """Handles an incoming IPC message.

        This currently supports registering and unregistering clients.

        Args:
            message (tuple): a 2-item tuple (command: str, argument)

        Returns:
            response to send to the client (True on success, Exception on failure)
        """
        if not isinstance(message, tuple):
            raise TypeError("Expected tuple, got " + str(type(message)))
        command, arg = message
        with lock:
            if exiting.is_set():
                raise RuntimeError("service is exiting, cannot connect")
            if command == "register":
                process = psutil.Process(int(arg))
                with self.cond:
                    if process not in self.clients:
                        self.clients.add(process)
                        start_daemon_thread(
                            target=lambda: self._background_wait(process)
                        )
                    return True
            elif command == "unregister":
                process = psutil.Process(int(arg))
                self._notify_exit(process)
                return True
            else:
                raise ValueError("Unrecognized command: " + repr(command))
Handles an incoming IPC message.

        This currently supports registering and unregistering clients.

        Args:
            message (tuple): a 2-item tuple (command: str, argument)

        Returns:
            response to send to the client (True on success, Exception on failure)
        
fiftyone/service/main.py