human
I wrote the below code

    @step('step1    of    first_outline')
    def step_def(step):
        raise Exception('Failed')
    world.scenario_names = set()
    world.hooks_for_failing_test = []
    @before.each_scenario
    def before_scenario(scenario):
        world.hooks_for_failing_test.append('before    scenario    {0}'.format(scenario.name))
    @after.each_scenario
    def after_scenario(scenario):
        world.hooks_for_failing_test.append('after    scenario    {0}'.format(scenario.name))
    @before.each_outline
    def before_outline(scenario, outline):
        world.scenario_names.add(scenario.name)
        world.hooks_for_failing_test.append('before    {0}'.format(outline['outline']))
    @after.each_outline
    def after_outline(scenario, outline):
        world.scenario_names.add(scenario.name)
        world.hooks_for_failing_test.append('after    {0}'.format(outline['outline']))
    feature = Feature.from_string(OUTLINE_FEATURE)
    try:
        feature.run(failfast=True)
    except Exception:
        pass
    assert_equals(world.hooks_for_failing_test, ['before    scenario    Outlines', 'before    first_outline', 'after    first_outline', 'after    scenario    Outlines'])

What's a good function header?
assistant
#Here's a good function header.

def test_outline_hooks_if_test_failed():