code: def _compute_grouped_metric(
      ungrouped_metric: np.ndarray, groups: np.ndarray
  ) -> np.ndarray:
      """Computes the mean value for the groups of parameter values.
  
      Parameters
      ----------
      ungrouped_metric: np.ndarray
          Metric calculated without considering the groups
      groups: np.ndarray
          Array defining the distribution of groups
  
      Returns
      -------
      mean_of_mu_star: np.ndarray
           Mean value for the groups of parameter values
      """
  
      groups = np.array(groups, dtype=bool)
  
      mu_star_masked = np.ma.masked_array(
          ungrouped_metric * groups.T, mask=(groups ^ 1).T
      )
      mean_of_mu_star = np.ma.mean(mu_star_masked, axis=1)
  
      return mean_of_mu_star
  
imports: from typing import Dict, List
  import numpy
  from scipy.stats import norm
  from .None import common_args
  from ..util import read_param_file, compute_groups_matrix, ResultDict, _define_problem_with_groups, _compute_delta, _check_groups
label_desc: Use image node_id 4 for calling a global function with example usage: _compute_grouped_metric(ungrouped_metric, groups) and returns: mean_of_mu_star