<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def service_messages(self, msg, _context):
 """Get all messages for a service."""


        msgs = self.service_manager.service_messages(msg.get('name'))
        return [x.to_dict() for x in msgs]