code: def test_model_fit_metrics(self) -> None:
      scheduler = Scheduler(
          experiment=self.branin_experiment,
          generation_strategy=self.generation_strategy,
          options=SchedulerOptions(),
      )
      # need to run some trials to initialize the ModelBridge
      scheduler.run_n_trials(max_trials=NUM_SOBOL + 1)
      model_bridge = get_fitted_model_bridge(scheduler)
  
      # testing ModelBridge.compute_model_fit_metrics with default metrics
      fit_metrics = model_bridge.compute_model_fit_metrics(
          self.branin_experiment
      )
      r2 = fit_metrics.get("coefficient_of_determination")
      self.assertIsInstance(r2, dict)
      r2 = cast(Dict[str, float], r2)
      self.assertTrue("branin" in r2)
      r2_branin = r2["branin"]
      self.assertIsInstance(r2_branin, float)
  
      std = fit_metrics.get("std_of_the_standardized_error")
      self.assertIsInstance(std, dict)
      std = cast(Dict[str, float], std)
      self.assertTrue("branin" in std)
      std_branin = std["branin"]
      self.assertIsInstance(std_branin, float)
  
      # testing with empty metrics
      empty_metrics = model_bridge.compute_model_fit_metrics(
          self.branin_experiment, fit_metrics_dict={}
      )
      self.assertIsInstance(empty_metrics, dict)
      self.assertTrue(len(empty_metrics) == 0)
  
file_path: Ax/ax/modelbridge/tests/test_model_fit_metrics.py
imports: from typing import cast, Dict
  from ax.core.experiment import Experiment
  from ax.core.objective import Objective
  from ax.core.optimization_config import OptimizationConfig
  from ax.metrics.branin import BraninMetric
  from ax.modelbridge.generation_strategy import GenerationStep, GenerationStrategy
  from ax.modelbridge.registry import Models
  from ax.runners.synthetic import SyntheticRunner
  from ax.service.scheduler import get_fitted_model_bridge, Scheduler, SchedulerOptions
  from ax.utils.common.constants import Keys
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_branin_search_space
label_desc: Use image node_id 2 for calling the TestModelBridgeFitMetrics obj's underlying member method code with example usage: obj.test_model_fit_metrics() without return types