code: def compute_model_fit_metrics(
      y_obs: Mapping[str, np.ndarray],
      y_pred: Mapping[str, np.ndarray],
      se_pred: Mapping[str, np.ndarray],
      fit_metrics_dict: Mapping[str, ModelFitMetricProtocol],
  ) -> Dict[str, Dict[str, float]]:
      """Computes the model fit metrics for each experimental metric in the input dicts.
  
      Args:
          y_obs: A dictionary mapping from experimental metric name to observed values.
          y_pred: A dictionary mapping from experimental metric name to predicted values.
          se_pred: A dictionary mapping from experimental metric name to predicted
              standard errors.
          fit_metrics_dict: A dictionary mapping from *model fit* metric name to a
              ModelFitMetricProtocol function that evaluates a model fit metric.
  
      Returns:
          A nested dictionary mapping from *model fit* and *experimental* metric names
          to their corresponding model fit metrics values.
      """
      metric_names = list(y_obs.keys())
      return {
          fit_metric_name: {
              exp_metric_name: fit_metric(
                  y_obs=y_obs[exp_metric_name],
                  y_pred=y_pred[exp_metric_name],
                  se_pred=se_pred[exp_metric_name],
              )
              for exp_metric_name in metric_names
          }
          for fit_metric_name, fit_metric in fit_metrics_dict.items()
      }
  
file_path: Ax/ax/utils/stats/model_fit_stats.py
imports: from typing import Dict, Mapping, Optional, Protocol
  import numpy
  from scipy.stats import fisher_exact, norm, pearsonr, spearmanr
label_desc: Use image node_id 1 for calling a global function with example usage: compute_model_fit_metrics(y_obs, y_pred, se_pred, fit_metrics_dict) and returns: unknown