code: def test_warnign(self) -> None:
      plot = figure(tools="")
      with pytest.warns(UserWarning) as warns:
          plot.legend.location = "above"
          assert len(warns) == 1
          assert warns[0].message.args[0] == _LEGEND_EMPTY_WARNING
  
imports: from __future__ import annotations
  import pytest
  from math import isnan
  from unittest import mock
  from unittest.mock import MagicMock, patch
  import xyzservices.providers
  from bokeh.core.validation import check_integrity, process_validation_issues
  from bokeh.models import CategoricalScale, CustomJS, DataRange1d, FactorRange, GlyphRenderer, Label, LinearAxis, LinearScale, LogScale, PanTool, Plot, Range1d, ResetTool, Title, WMTSTileSource, ZoomInTool, ZoomOutTool
  from bokeh.plotting import figure
  import bokeh.models.plots
label_desc: Use image node_id 2 for calling the TestPlotLegendProperty obj's underlying member method code with example usage: obj.test_warnign() without return types