'Applies next condition to responses.'

def ApplyCondition(self, response, condition_index):

    if (condition_index >= len(self.state.sorted_conditions)):
        self.ProcessAction(response)
    else:
        condition_options = self.state.sorted_conditions[condition_index]
        (condition_handler, _) = self.condition_handlers[condition_options.condition_type]
        condition_handler(response, condition_options, condition_index)
