class_docstr: Simple plugin for a bokeh framework
docstr: Args:
      fig: bokeh Figure
      group_logs: groups with list of log items
  
  Notes:
      for now, with local imports, no output annotation  -> self.plotting.Figure
      there used to be skip first part, but I skip it first
docstr_tok: ["Args",":","fig",":","bokeh","Figure","group_logs",":","groups","with","list","of","log","items","Notes",":","for","now",",","with","local","imports",",","no","output","annotation","-",">","self.plotting.Figure","there","used","to","be","skip","first","part",",","but","I","skip","it","first"]
code: def _draw_metric_subplot(
      self, fig, group_logs: Dict[str, List[LogItem]]
  ):
      """
      Args:
          fig: bokeh Figure
          group_logs: groups with list of log items
  
      Notes:
          for now, with local imports, no output annotation  -> self.plotting.Figure
          there used to be skip first part, but I skip it first
      """
      from bokeh.models import ColumnDataSource, HoverTool
  
      for i, (name, logs) in enumerate(group_logs.items()):
          if len(logs) > 0:
              source = ColumnDataSource(
                  data={
                      "step": [log.step for log in logs],
                      "value": [log.value for log in logs],
                  }
              )
              fig.line(
                  x="step",
                  y="value",
                  color=self.colors[i],
                  legend_label=name,
                  source=source,
              )
  
      fig.add_tools(
          HoverTool(
              tooltips=[
                  ("step", "@step"),
                  ("value", "@value{0.3f}"),
              ],
              formatters={
                  "step": "printf",
                  "value": "printf",
              },
              mode="vline",
          )
      )
      return fig
  
file_path: livelossplot/livelossplot/outputs/bokeh_plot.py
imports: from typing import List, Dict, Tuple
  from livelossplot.main_logger import MainLogger, LogItem
  from livelossplot.outputs.base_output import BaseOutput
label_desc: Use image node_id 3 for calling the BokehPlot obj's underlying member method code with example usage: obj._draw_metric_subplot(fig, group_logs) and returns: fig