code: def test_HasGoodOptConfigModelFit(self) -> None:
      # Construct diagnostics
      result = []
      for i, obs in enumerate(self.training_data):
          result.append(
              CVResult(observed=obs, predicted=self.observation_data[i])
          )
      diag = compute_diagnostics(result=result)
      assess_model_fit_result = assess_model_fit(
          diagnostics=diag,
          significance_level=0.05,
      )
  
      # Test single objective
      optimization_config = OptimizationConfig(
          objective=Objective(metric=Metric("a"))
      )
      has_good_fit = has_good_opt_config_model_fit(
          optimization_config=optimization_config,
          assess_model_fit_result=assess_model_fit_result,
      )
      self.assertFalse(has_good_fit)
  
      # Test multi objective
      optimization_config = MultiObjectiveOptimizationConfig(
          objective=MultiObjective(metrics=[Metric("a"), Metric("b")])
      )
      has_good_fit = has_good_opt_config_model_fit(
          optimization_config=optimization_config,
          assess_model_fit_result=assess_model_fit_result,
      )
      self.assertFalse(has_good_fit)
  
      # Test constraints
      optimization_config = OptimizationConfig(
          objective=Objective(metric=Metric("a")),
          outcome_constraints=[
              OutcomeConstraint(
                  metric=Metric("b"), op=ComparisonOp.GEQ, bound=0.1
              )
          ],
      )
      has_good_fit = has_good_opt_config_model_fit(
          optimization_config=optimization_config,
          assess_model_fit_result=assess_model_fit_result,
      )
      self.assertFalse(has_good_fit)
  
imports: from typing import List
  from unittest import mock
  import numpy
  from ax.core.metric import Metric
  from ax.core.objective import MultiObjective, Objective
  from ax.core.observation import Observation, ObservationData, ObservationFeatures
  from ax.core.optimization_config import MultiObjectiveOptimizationConfig, OptimizationConfig
  from ax.core.outcome_constraint import OutcomeConstraint
  from ax.core.types import ComparisonOp
  from ax.modelbridge.cross_validation import assess_model_fit, compute_diagnostics, cross_validate, cross_validate_by_trial, CVDiagnostics, CVResult, has_good_opt_config_model_fit, SingleDiagnosticBestModelSelector
  from ax.modelbridge.registry import Models
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_branin_experiment
label_desc: Use image node_id 8 for calling the CrossValidationTest obj's underlying member method code with example usage: obj.test_HasGoodOptConfigModelFit() without return types