code: def test_sobol_group_analysis():
      """Ensure valid groupings are returned from the Sobol analysis method."""
  
      group_spec = ProblemSpec(
          {
              "names": ["P1", "P2", "P3", "P4", "P5", "P6"],
              "bounds": [
                  [0.0, 1.0],
                  [0.0, 1.0, 0.75],
                  [0.0, 0.2],
                  [0.0, 0.2],
                  [-1.0, 1.0],
                  [0.0, 1.0, 0.25],
              ],
              "dists": [
                  "unif",
                  "triang",
                  "norm",
                  "lognorm",
                  "unif",
                  "triang",
              ],
              "groups": ["A", "B"] * 3,
          }
      )
  
      # fmt: off
      (group_spec
          .sample_saltelli(128)
          .evaluate(example_func)
          .analyze_sobol()
      )   # noqa: E124
      # fmt: on
  
      ST, S1, S2 = group_spec.to_df()
  
      assert len(ST.index) == 2, "Unexpected number of groups"
      assert len(ST[ST.index == "A"]) == 1, "Could not find Group A"
      assert len(ST[ST.index == "B"]) == 1, "Could not find Group B"
  
imports: import numpy
  from SALib import ProblemSpec
label_desc: Use image node_id 2 for calling a global function with example usage: test_sobol_group_analysis() without return types