<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def cancel(self):
        '''Cancel any request.'''
        if self._body:
            self._body._cancel = True
        else:
            self._cancel = True