code: def test_pop_legend_kwarg(key) -> None:
      kws = {"foo": 10, key: "bar"}
      assert bpl.pop_legend_kwarg(kws) == {key: "bar"}
  
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 a global function with example usage: test_pop_legend_kwarg(key) without return types