code: def has_good_opt_config_model_fit(
      optimization_config: OptimizationConfig,
      assess_model_fit_result: AssessModelFitResult,
  ) -> bool:
      """Assess model fit for given diagnostics results across the optimization
      config metrics
  
      Bad fit criteria: Any objective metrics are poorly fit based on
      the Fisher exact test p (see assess_model_fit())
  
      TODO[]: Incl. outcome constraints in assessment
  
      Args:
          optimization_config: Objective/Outcome constraint metrics to assess
          diagnostics: Output of compute_diagnostics
  
      Returns:
          Two dictionaries, one for good metrics, one for bad metrics, each
          mapping metric name to p-value
      """
  
      # Bad fit criteria: Any objective metrics are poorly fit
      # TODO[]: Incl. outcome constraints in assessment
      has_good_opt_config_fit = all(
          (
              m.name
              in assess_model_fit_result.good_fit_metrics_to_fisher_score
          )
          for m in optimization_config.objective.metrics
      )
      return has_good_opt_config_fit
  
imports: from abc import ABC, abstractmethod
  from collections import defaultdict
  from enum import Enum
  from functools import partial
  from logging import Logger
  from numbers import Number
  from typing import Any, Callable, Dict, Iterable, List, NamedTuple, Optional, Set, Tuple
  import numpy
  from ax.core.observation import Observation, ObservationData
  from ax.core.optimization_config import OptimizationConfig
  from ax.modelbridge.base import ModelBridge
  from ax.utils.common.logger import get_logger
  from ax.utils.stats.model_fit_stats import _correlation_coefficient, _fisher_exact_test_p, _log_likelihood, _mape, _mean_prediction_ci, _rank_correlation, _total_raw_effect, _wmape, compute_model_fit_metrics
label_desc: Use image node_id 6 for calling a global function with example usage: has_good_opt_config_model_fit(optimization_config, assess_model_fit_result) and returns: has_good_opt_config_fit