code: def run_nested_error_groups():
    
    test = htf.Test(
        htf.PhaseGroup(
            main=[
                htf.PhaseGroup.with_teardown(inner_teardown_phase)(
                    error_main_phase, main_phase),
                main_phase,
            ],
            teardown=[teardown_phase],
        )
    )
    test.execute()
docs: Run nested groups example where an error occurs in nested main phase.
  
    In this example, the first main phase in the nested PhaseGroup errors out.
    The other inner main phase is skipped, as is the outer main phase.  Both
    PhaseGroups were entered, so both teardown phases are run.