def FromDictionary(cls, msg_dict):
        """Create from a dictionary with kv pairs.

        Args:
            msg_dict (dict): A dictionary with information as created by to_dict()

        Returns:
            ServiceMessage: the converted message
        """

        level = msg_dict.get('level')
        msg = msg_dict.get('message')
        now = msg_dict.get('now_time')
        created = msg_dict.get('created_time')
        count = msg_dict.get('count', 1)
        msg_id = msg_dict.get('id', 0)

        new_msg = ServiceMessage(level, msg, msg_id, created, now)
        if count > 1:
            new_msg.count = count

        return new_msg
Create from a dictionary with kv pairs.

        Args:
            msg_dict (dict): A dictionary with information as created by to_dict()

        Returns:
            ServiceMessage: the converted message