def METHOD_NAME(item, call):
    pytest_html = item.config.pluginmanager.getplugin("html")
    outcome = yield
    report = outcome.get_result()
    extra = getattr(report, "extra", [])
    if report.when == "teardown":
        dump_logs(pytest_html, extra)
    report.extra = extra