def METHOD_NAME(
    config, benchmarks, include_data, machine_info, commit_info
):
    """
    Hook which makes sure we include custom metrics such as compression_ratio in the output JSON.
    In addition to that, it also adds "submit_result_to_codespeed" to the "options" dict if the
    original function is decorated with "submit_result_to_codespeed" decorator.
    """
    for benchmark in benchmarks:
        submit_result_to_codespeed = getattr(
            benchmark.fixture, "submit_result_to_codespeed", False
        )
        benchmark.options["submit_result_to_codespeed"] = submit_result_to_codespeed
        for metric_name in CUSTOM_METRICS:
            metric_value = getattr(benchmark.stats, metric_name, None)
            if metric_value is None:
                continue
            benchmark.stats.fields = list(benchmark.stats.fields)
            benchmark.stats.fields += [metric_name]
            benchmark.options["has_custom_metrics"] = True
    yield