code: def test_multiple_legends(self) -> None:
      plot = figure()
      plot.add_layout(Legend())
      plot.add_layout(Legend())
  
      with pytest.raises(RuntimeError) as e:
          bpl._get_or_create_legend(plot)
          assert str(e).endswith(
              "configured with more than one legend renderer, cannot use legend_* convenience arguments"
          )
  
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 3 for calling the Test__get_or_create_legend obj's underlying member method code with example usage: obj.test_multiple_legends() without return types