code: def test_label_not_already_exists(self) -> None:
      legend = Legend(items=[LegendItem(label=field("foo"))])
      renderer = GlyphRenderer()
      bpl._handle_legend_field("bar", legend, renderer)
      assert len(legend.items) == 2
      assert legend.items[0].label == field("foo")
      assert legend.items[0].renderers == []
      assert legend.items[1].label == field("bar")
      assert legend.items[1].renderers == [renderer]
  
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__handle_legend_field obj's underlying member method code with example usage: obj.test_label_not_already_exists() without return types