code: def test_bad_source(self) -> None:
      with pytest.raises(ValueError):
          bpl._handle_legend_group("foo", "legend", GlyphRenderer())
      with pytest.raises(ValueError):
          bpl._handle_legend_group(
              "foo",
              "legend",
              GlyphRenderer(
                  data_source=ColumnDataSource(data=dict(bar=[]))
              ),
          )
  
imports: from __future__ import annotations
  import pytest
  import itertools
  from bokeh.core.properties import field, value
  from bokeh.models import ColumnDataSource, GlyphRenderer, Legend, LegendItem
  from bokeh.plotting import figure
  import bokeh.plotting._legends
label_desc: Use image node_id 2 for calling the Test__handle_legend_group obj's underlying member method code with example usage: obj.test_bad_source() without return types