code: def test_legend_not_already_exists(self) -> None:
      plot = figure()
      assert plot.legend == []
      legend = bpl._get_or_create_legend(plot)
      assert plot.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 1 for calling the Test__get_or_create_legend obj's underlying member method code with example usage: obj.test_legend_not_already_exists() without return types