def Handle_Receive(self, msg):
        """
        Handle a received message.

        :param msg: the received message
        :type msg: str
        :returns: The message to reply with
        :rtype: str
        """

        msg = self.Check_Message(msg)
        msg_type = msg['type']

        f_name = "Handle_{0}".format(msg_type)
        try:
            f = getattr(self, f_name)
        except AttributeError:
            f = self.Handle_ERROR(msg)
        reply = f(msg)

        return reply
Handle a received message.

        :param msg: the received message
        :type msg: str
        :returns: The message to reply with
        :rtype: str