code: def test__find_legend_item() -> None:
      legend = Legend(
          items=[
              LegendItem(label=value("foo")),
              LegendItem(label=field("bar")),
          ]
      )
      assert bpl._find_legend_item(value("baz"), legend) is None
      assert (
          bpl._find_legend_item(value("foo"), legend) is legend.items[0]
      )
      assert (
          bpl._find_legend_item(field("bar"), legend) is legend.items[1]
      )
  
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 4 for calling a global function with example usage: test__find_legend_item() without return types