code: def test_compute_grouped_metric():
      """
      Computes mu_star for 3 variables grouped into 2 groups
      There are six trajectories.
      """
      group_matrix = np.array([[1, 0], [0, 1], [0, 1]], dtype=int)
  
      ee = np.array(
          [
              [2.52, 2.01, 2.30, -0.66, -0.93, -1.30],
              [-2.00, 0.13, -0.80, 0.25, -0.02, 0.51],
              [2.00, -0.13, 0.80, -0.25, 0.02, -0.51],
          ]
      )
      mu_star = np.average(np.abs(ee), 1)
      actual = _compute_grouped_metric(mu_star, group_matrix)
      desired = np.array([1.62, 0.62], dtype=float)
  
      assert_allclose(actual, desired, rtol=1e-1)
  
file_path: SALib/tests/test_analyze_morris.py
imports: from pytest import raises, fixture
  import numpy
  from numpy.testing import assert_allclose, assert_equal
  from SALib.analyze.morris import analyze, _compute_mu_star_confidence, _compute_elementary_effects, _reorganize_output_matrix, _compute_grouped_metric, _compute_grouped_sigma, _check_if_array_of_floats
label_desc: Use image node_id 12 for calling a global function with example usage: test_compute_grouped_metric() without return types