code: def plot_figure(data, **kwargs):
      """Plot profile data using Bokeh
  
      This takes the output from the function ``plot_data`` and produces a Bokeh
      figure
  
      See Also
      --------
      plot_data
      """
      from bokeh.models import HoverTool
      from bokeh.plotting import ColumnDataSource, figure
  
      if "states" in data:
          data = toolz.dissoc(data, "states")
  
      source = ColumnDataSource(data=data)
  
      fig = figure(tools="tap,box_zoom,xwheel_zoom,reset", **kwargs)
      r = fig.quad(
          "left",
          "right",
          "top",
          "bottom",
          color="color",
          line_color="black",
          line_width=2,
          source=source,
      )
  
      r.selection_glyph = None
      r.nonselection_glyph = None
  
      hover = HoverTool(
          point_policy="follow_mouse",
          tooltips="""
              <div>
                  <span style="font-size: 14px; font-weight: bold;">Name:</span>&nbsp;
                  <span style="font-size: 10px; font-family: Monaco, monospace;">@name</span>
              </div>
              <div>
                  <span style="font-size: 14px; font-weight: bold;">Filename:</span>&nbsp;
                  <span style="font-size: 10px; font-family: Monaco, monospace;">@filename</span>
              </div>
              <div>
                  <span style="font-size: 14px; font-weight: bold;">Line number:</span>&nbsp;
                  <span style="font-size: 10px; font-family: Monaco, monospace;">@line_number</span>
              </div>
              <div>
                  <span style="font-size: 14px; font-weight: bold;">Line:</span>&nbsp;
                  <span style="font-size: 10px; font-family: Monaco, monospace;">@line</span>
              </div>
              <div>
                  <span style="font-size: 14px; font-weight: bold;">Time:</span>&nbsp;
                  <span style="font-size: 10px; font-family: Monaco, monospace;">@time</span>
              </div>
              <div>
                  <span style="font-size: 14px; font-weight: bold;">Percentage:</span>&nbsp;
                  <span style="font-size: 10px; font-family: Monaco, monospace;">@percentage</span>
              </div>
              """,
      )
      fig.add_tools(hover)
  
      fig.xaxis.visible = False
      fig.yaxis.visible = False
      fig.grid.visible = False
  
      return fig, source
  
imports: from __future__ import annotations
  import bisect
  import dis
  import linecache
  import sys
  import threading
  from collections import defaultdict, deque
  from collections.abc import Callable, Collection
  from time import sleep
  from types import FrameType
  from typing import Any
  import tlz
  import dask.config
  from dask.typing import NoDefault, no_default
  from dask.utils import format_time, parse_timedelta
  from distributed.metrics import time
  from distributed.utils import color_of
label_desc: Use image node_id 13 for calling a global function with example usage: plot_figure(data) and returns: fig,  source