code: def test_contour_colorbar(xyz_levels: XYZ_Levels) -> None:
      x, y, z, levels = xyz_levels
      cr = from_contour(
          x, y, z, levels, fill_color="red", line_color="black"
      )
      color_bar = cr.construct_color_bar()
      assert color_bar.levels == levels
      assert color_bar.fill_renderer == cr.fill_renderer
      assert color_bar.line_renderer == cr.line_renderer
  
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 a global function with example usage: test_contour_colorbar(xyz_levels) without return types