human
Complete the below
@sync_performer
def perform_sequence(dispatcher, intent):

    ''''Performer for :class:`Sequence`.'
    '''
assistant
#Here is the Python program you requested.
    effects = list(intent.effects)
    if (not effects):
        return []
    results = []
    def succeed(next_effect, result):
        results.append(result)
        return next_effect
    def fail(result):
        reraise(SequenceFailed, SequenceFailed(results=results, exc_info=result), result[2])
    def reducer(next_effect, effect):
        return effect.on(success=partial(succeed, next_effect), error=fail)
    return reduce(reducer, reversed(effects), results)