code: def build_benchmarking_result(
      benchmarking_config: dict, experiment_idx: int
  ):
      experiment_config = benchmarking_config["experiments"][
          experiment_idx
      ]
      process_config_file = ""
      if experiment_config["process_config_file_path"]:
          with open(experiment_config["process_config_file_path"]) as f:
              process_config_file = "".join(f.readlines())
      experiment_run_path = os.path.join(
          experiment_config["experiment_name"], "experiment_run"
      )
  
      return BenchmarkingResult(
          benchmarking_config=benchmarking_config,
          experiment_config=experiment_config,
          ludwig_config=load_yaml(experiment_config["config_path"]),
          process_config_file=process_config_file,
          description=load_json(
              os.path.join(experiment_run_path, "description.json")
          ),
          test_statistics=load_json(
              os.path.join(experiment_run_path, "test_statistics.json")
          ),
          training_statistics=load_json(
              os.path.join(
                  experiment_run_path, "training_statistics.json"
              )
          ),
          model_hyperparameters=load_json(
              os.path.join(
                  experiment_run_path,
                  "model",
                  "model_hyperparameters.json",
              )
          ),
          training_progress=load_json(
              os.path.join(
                  experiment_run_path, "model", "training_progress.json"
              )
          ),
          training_set_metadata=load_json(
              os.path.join(
                  experiment_run_path,
                  "model",
                  "training_set_metadata.json",
              )
          ),
      )
  
imports: import os
  from dataclasses import dataclass
  from typing import Any, Dict
  from ludwig.types import ModelConfigDict, TrainingSetMetadataDict
  from ludwig.utils.data_utils import load_json, load_yaml
label_desc: Use image node_id 1 for calling a global function with example usage: build_benchmarking_result(benchmarking_config, experiment_idx) and returns: BenchmarkingResult