<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def serviceQueues(self, limit=None):
 """ Process `limit` number of messages in the inBox. :param limit: the maximum number of messages to process :return: the number of messages successfully processed """

        # TODO should handle SuspiciousNode here
        r = self.dequeue_pre_prepares()
        r += self.inBoxRouter.handleAllSync(self.inBox, limit)
        r += self.send_3pc_batch()
        r += self._serviceActions()
        return r