<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def work(self, actions_queue, returns_queue, control_queue=None):
 # pragma: no cover """Wrapper function for do_work in order to catch the exception to see the real work, look at do_work :param actions_queue: Global Queue Master->Slave :type actions_queue: Queue.Queue :param returns_queue: queue managed by manager :type returns_queue: Queue.Queue :return: None """

        try:
            logger.info("[%s] (pid=%d) starting my job...", self._id, os.getpid())
            self.do_work(actions_queue, returns_queue, control_queue)
            logger.info("[%s] (pid=%d) stopped", self._id, os.getpid())
        except ActionError as exp:
            logger.error("[%s] exited with an ActionError exception : %s", self._id, str(exp))
            logger.exception(exp)
            raise
        # Catch any exception, log the exception and exit anyway
        except Exception as exp:  # pragma: no cover, this should never happen indeed ;)
            logger.error("[%s] exited with an unmanaged exception : %s", self._id, str(exp))
            logger.exception(exp)
            raise