class_docstr: Tests the 'plot_predictions' function for different combinations of main, group,
  and panel variables.
class_docstr_tok: ["Tests","the","'plot_predictions","'","function","for","different","combinations","of","main",",","group",",","and","panel","variables","."]
code: def test_group_effects(self, sleep_study):
      model, idata = sleep_study
  
      # contains new unseen data
      plot_predictions(
          model, idata, ["Days", "Subject"], sample_new_groups=True
      )
  
      with pytest.raises(
          ValueError,
          match="There are new groups for the factors \('Subject',\) and 'sample_new_groups' is False.",
      ):
          # default: sample_new_groups=False
          plot_predictions(model, idata, ["Days", "Subject"])
  
imports: from os.path import dirname, join
  import numpy
  import pandas
  import matplotlib.pyplot
  import pytest
  import bambi
  from bambi.interpret import plot_comparisons, plot_predictions, plot_slopes
label_desc: Use image node_id 10 for calling the TestPredictions obj's underlying member method code with example usage: obj.test_group_effects(sleep_study) without return types