code: def setup_failure(self, scenario=None, **args):
          
          assert scenario is not None and scenario in self.functiondict
          self.functiondict[scenario](**args)
docs: Add a given failure scenario
          @param scenario: string 'delayrequests' or 'crash'