def METHOD_NAME(self):
    """Tests if coefficients are properly re-structured."""
    observables = [PauliY(0), PauliX(0) @ PauliX(1), PauliZ(1)]
    coefficients = [1.43, 4.21, 0.97]
    grouped_coeffs_sol = [[4.21], [1.43, 0.97]]
    grouped_coeffs = optimize_measurements(
        observables, coefficients, grouping="qwc", colouring_method="rlf"
    )[2]
    assert len(grouped_coeffs) == len(grouped_coeffs_sol)
    assert all(
        np.allclose(grouped_coeffs[i], grouped_coeffs_sol[i])
        for i in range(len(grouped_coeffs_sol))
    )