<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setup_failure(self, scenario=None, **args):
 """Add a given failure scenario @param scenario: string 'delayrequests' or 'crash' """

        assert scenario is not None and scenario in self.functiondict
        self.functiondict[scenario](**args)