Handle both sync and async functions.

        :param msg: a message
        :return: the result of execution of the function corresponding to this message's type

async def handle(self, msg: Any) -> Any:
        """
        Handle both sync and async functions.

        :param msg: a message
        :return: the result of execution of the function corresponding to this message's type
        """
        res = self.handleSync(msg)
        if isawaitable(res):
            return await res
        else:
            return res