<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main(self, *args, **kwargs):
 """Implement the actor main loop by waiting forever for messages."""

        self.start(*args, **kwargs)
        try:
            while 1:
                body, message = yield self.receive()
                handler = self.get_handler(message)
                handler(body, message)
        finally:
            self.stop(*args, **kwargs)