<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def workflow_script_cancel(self):
 """ When the round is cancelled, all its associated Samples and ARs are cancelled by the system. """

        if skip(self, "cancel"):
            return
        self.reindexObject(idxs=["is_active", ])
        # deactivate all analysis requests in this sampling round.
        analysis_requests = self.getAnalysisRequests()
        for ar in analysis_requests:
            ar_obj = ar.getObject()
            workflow = getToolByName(self, 'portal_workflow')
            if workflow.getInfoFor(ar_obj, 'review_state') != 'cancelled':
                doActionFor(ar.getObject(), 'cancel')