code: def test_legend_already_exists(self, place) -> None:
      plot = figure()
      legend = Legend()
      plot.add_layout(legend, place)
  
      got_legend = bpl._get_or_create_legend(plot)
      assert got_legend == legend
  
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__get_or_create_legend obj's underlying member method code with example usage: obj.test_legend_already_exists(place) without return types