code: def plot_bokeh_history(
      solvers, x, y, x_arrays, y_arrays, mins, legends, log_scale, show
  ):
      import bokeh.plotting as bk
  
      min_x, max_x, min_y, max_y = mins
      if log_scale:
          # Bokeh has a weird behaviour when using logscale with 0 entries...
          # We use the difference between smallest value of second small
          # to set the range of y
          all_ys = np.hstack(y_arrays)
          y_range_min = np.min(all_ys[all_ys != 0])
          if y_range_min < 0:
              raise ValueError(
                  "Cannot plot negative values on a log scale"
              )
  
          fig = bk.Figure(
              plot_height=300,
              y_axis_type="log",
              y_range=[y_range_min, max_y],
          )
      else:
          fig = bk.Figure(
              plot_height=300,
              x_range=[min_x, max_x],
              y_range=[min_y, max_y],
          )
  
      for i, (solver, x_array, y_array, legend) in enumerate(
          zip(solvers, x_arrays, y_arrays, legends)
      ):
          color = get_plot_color(i)
          fig.line(
              x_array, y_array, line_width=3, legend=legend, color=color
          )
      fig.xaxis.axis_label = x
      fig.yaxis.axis_label = y
      fig.xaxis.axis_label_text_font_size = "12pt"
      fig.yaxis.axis_label_text_font_size = "12pt"
      if show:
          bk.show(fig)
          return None
      else:
          return fig
  
imports: import matplotlib.pyplot
  import numpy
  from tick.base.learner import LearnerOptim
  from tick.plot.plot_utilities import get_plot_color
  from tick.solver.base import Solver
label_desc: Use image node_id 3 for calling a global function with example usage: plot_bokeh_history(solvers, x, y, x_arrays, y_arrays, mins, legends, log_scale, show) and returns: None, fig