def METHOD_NAME(item, call):
    def atoi(text):
        return int(text) if text.isdigit() else text
    # Define HTML style
    pytest_html = item.config.pluginmanager.getplugin('html')
    pytest_html.html.body = HTMLStyle.body
    pytest_html.html.table = HTMLStyle.table
    pytest_html.html.th = HTMLStyle.th
    pytest_html.html.td = HTMLStyle.td
    pytest_html.html.h1 = HTMLStyle.h1
    pytest_html.html.h2 = HTMLStyle.h2
    pytest_html.html.h3 = HTMLStyle.h3
    pytest_html.html.p = HTMLStyle.b
    documentation = FunctionDoc(item.function)
    outcome = yield
    report = outcome.get_result()
    extra = getattr(report, 'extra', [])
    report.description = '. '.join(documentation["Summary"])
    if report.when == 'teardown':
        # Attach error logs per each node in the 'test_cluster_error_logs' test.
        if report.head_line == 'test_cluster_error_logs' and item.module.nodes_with_errors:
            extra.append(pytest_html.extras.html("<h2>Error logs</h2>"))
            # Keys are human/natural sorted.
            for node, logs in sorted(item.module.nodes_with_errors.items(),
                                     key=lambda d: [atoi(c) for c in re.split(r'(\d+)', d[0])]):
                extra.append(pytest_html.extras.html(f'<p><b>{node}:</b>\n' + '\n'.join(
                    log_line.decode() for log_line in logs) + '</p>'))
            extra.append(pytest_html.extras.html("</p><h2>Test output</h2>"))
        # Attach wrong order logs per each node in the 'test_check_logs_order' tests (both master's and workers').
        elif report.head_line == 'test_check_logs_order_workers' or report.head_line == 'test_check_logs_order_master' \
                and item.module.incorrect_order:
            extra.append(pytest_html.extras.html("<h2>Wrong worker logs order</h2>" if 'workers' in report.head_line
                                                 else "<h2>Wrong master logs order</h2>"))
            # Keys are human/natural sorted.
            for key in sorted(item.module.incorrect_order.keys(),
                              key=lambda d: [atoi(c) for c in re.split(r'(\d+)', d)]):
                extra.append(pytest_html.extras.html(f"<p><b>{key}:</b>\n"))
                for failed_task in item.module.incorrect_order[key]:
                    extra.append(pytest_html.extras.html('<b> - Log type:</b> {log_type}\n'
                                                         '<b>   Expected logs:</b> {expected_logs}\n'
                                                         '<b>   Found log:</b> {found_log}'.format(**failed_task)))
            extra.append(pytest_html.extras.html("</p><h2>Test output</h2>"))
        # Attach repeated Integrity synchronizations per each node in the 'test_cluster_sync' test.
        elif report.head_line == 'test_cluster_sync' and item.module.repeated_syncs:
            extra.append(pytest_html.extras.html("<h2>Repeated Integrity synchronizations</h2>"))
            output = []
            # Keys are human/natural sorted.
            for worker, values in sorted(item.module.repeated_syncs.items(),
                                         key=lambda d: [atoi(c) for c in re.split(r'(\d+)', d[0])]):
                output.append('<b>{worker} - Log found {repeat_counter} times in a row:</b>\n'
                              '{log}'.format(**values, worker=worker))
            extra.append(pytest_html.extras.html('<p>' + '\n\n'.join(output) + '</p>'))
            extra.append(pytest_html.extras.html("</p><h2>Test output</h2>"))
        # Attach nodes were some tasks were repeted or not completed in the requested order from the
        # 'test_cluster_task_order' test.
        elif report.head_line == 'test_cluster_task_order' and item.module.incorrect_order:
            for key in item.module.incorrect_order:
                extra.append(pytest_html.extras.html("<h2>Wrong task order.</h2>"))
                extra.append(pytest_html.extras.html(f"<p><b>Concatenated tasks '{key}' and "
                                                     f"'{item.module.incorrect_order[key]['child_task']}'"
                                                     f" failed due to {item.module.incorrect_order[key]['status']}"
                                                     f" logs:\n\t{item.module.incorrect_order[key]['log']}</b>"))
            extra.append(pytest_html.extras.html("</p><h2>Test output</h2>"))
        report.extra = extra