code: def test_fill_line(
      self, xyz_levels: XYZ_Levels, want_fill: bool, want_line: bool
  ) -> None:
      x, y, z, levels = xyz_levels
  
      kwargs = {}
      if want_fill:
          kwargs["fill_color"] = "red"
      if want_line:
          kwargs["line_color"] = "green"
  
      cr = from_contour(x, y, z, levels, **kwargs)
      assert np.allclose(cr.levels, levels)
  
      fill_data = cr.fill_renderer.data_source.data
      assert list(fill_data.keys()) == [
          "xs",
          "ys",
          "lower_levels",
          "upper_levels",
      ]
      if want_fill:
          assert np.allclose(fill_data["lower_levels"], [-0.5, 1.5])
          assert np.allclose(fill_data["upper_levels"], [1.5, 3.5])
          assert len(fill_data["xs"]) == 2
          assert len(fill_data["ys"]) == 2
          assert np.allclose(
              fill_data["xs"][0], [0, 1, 1.5, 1, 0.5, 0, 0]
          )
          assert np.allclose(
              fill_data["ys"][0], [0, 0, 0, 0.5, 1, 1, 0]
          )
          assert np.allclose(
              fill_data["xs"][1], [0.5, 1, 1.5, 2, 2, 1, 0.5]
          )
          assert np.allclose(
              fill_data["ys"][1], [1, 0.5, 0, 0, 1, 1, 1]
          )
  
          glyph = cr.fill_renderer.glyph
          assert glyph.fill_color == "red"
          assert glyph.line_width == 0
      else:
          assert fill_data == dict(
              xs=[], ys=[], lower_levels=[], upper_levels=[]
          )
  
      line_data = cr.line_renderer.data_source.data
      assert list(line_data.keys()) == ["xs", "ys", "levels"]
      if want_line:
          assert np.allclose(line_data["levels"], [-0.5, 1.5, 3.5])
          assert len(line_data["xs"]) == 3
          assert len(line_data["ys"]) == 3
          assert np.allclose(line_data["xs"][0], [])
          assert np.allclose(line_data["ys"][0], [])
          assert np.allclose(line_data["xs"][1], [0.5, 1, 1.5])
          assert np.allclose(line_data["ys"][1], [1, 0.5, 0])
          assert np.allclose(line_data["xs"][2], [])
          assert np.allclose(line_data["ys"][2], [])
  
          assert cr.line_renderer.glyph.line_color == "green"
      else:
          assert line_data == dict(xs=[], ys=[], levels=[])
  
imports: from __future__ import annotations
  import pytest
  from typing import TYPE_CHECKING
  import numpy
  from bokeh.plotting.contour import FillData, LineData, contour_data, from_contour
label_desc: Use image node_id 1 for calling the Test_from_contour obj's underlying member method code with example usage: obj.test_fill_line(xyz_levels, want_fill, want_line) without return types