<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stop(self, actor=None):
 """Stop the application """

        if actor is None:
            actor = get_actor()
        if actor and actor.is_arbiter():
            monitor = actor.get_actor(self.name)
            if monitor:
                return monitor.stop()
        raise RuntimeError('Cannot stop application')