code: def plot_continuous_bar(
      data_dict,
      multiclass=False,
      show_error=True,
      title=None,
      xtitle="",
      ytitle="",
  ):
      if data_dict.get("scores", None) is None:  # pragma: no cover
          return None
  
      x_vals = data_dict["names"].copy()
      y_vals = data_dict["scores"].copy()
      y_hi = data_dict.get("upper_bounds", None)
      y_lo = data_dict.get("lower_bounds", None)
  
      # x_min = min(x_vals)
      # x_max = max(x_vals)
  
      if y_hi is None or multiclass:
          _log.warning(
              "Argument show_error is set to true, but there are no bounds in the data."
          )
          show_error = False
  
      def extend_x_range(x):
          return x
  
      def extend_y_range(y):
          return np.r_[y, y[np.newaxis, -1]]
  
      new_x_vals = extend_x_range(x_vals)
      new_y_vals = extend_y_range(y_vals)
      if show_error:
          new_y_hi = extend_y_range(y_hi)
          new_y_lo = extend_y_range(y_lo)
  
      data = []
      fill = "none"
      if show_error:
          fill = "tonexty"
  
      if multiclass:
          for i in range(y_vals.shape[1]):
              class_name = (
                  "Class {}".format(i)
                  if "meta" not in data_dict
                  else data_dict["meta"]["label_names"][i]
              )
              class_line = go.Scatter(
                  x=new_x_vals,
                  y=new_y_vals[:, i],
                  line=dict(shape="hv"),
                  name=class_name,
                  mode="lines",
              )
              data.append(class_line)
      else:
          main_line = go.Scatter(
              x=new_x_vals,
              y=new_y_vals,
              name="Main",
              mode="lines",
              line=dict(color="rgb(31, 119, 180)", shape="hv"),
              fillcolor="rgba(68, 68, 68, 0.15)",
              fill=fill,
          )
          data.append(main_line)
  
      if show_error:
          upper_bound = go.Scatter(
              name="Upper Bound",
              x=new_x_vals,
              y=new_y_hi,
              mode="lines",
              marker=dict(color="#444"),
              line=dict(width=0, shape="hv"),
              fillcolor="rgba(68, 68, 68, 0.15)",
              fill="tonexty",
          )
          lower_bound = go.Scatter(
              name="Lower Bound",
              x=new_x_vals,
              y=new_y_lo,
              marker=dict(color="#444"),
              line=dict(width=0, shape="hv"),
              mode="lines",
          )
          data = [lower_bound, main_line, upper_bound]
  
      show_legend = True if multiclass or not show_error else False
      layout = go.Layout(
          title=title,
          showlegend=show_legend,
          xaxis=dict(title=xtitle),
          yaxis=dict(title=ytitle),
      )
      yrange = None
      if data_dict.get("scores_range", None) is not None:
          scores_range = data_dict["scores_range"]
          yrange = scores_range
  
      main_fig = go.Figure(data=data, layout=layout)
  
      # Add density
      if data_dict.get("density", None) is not None:
          figure = _plot_with_density(
              data_dict["density"],
              main_fig,
              title=title,
              xtitle=xtitle,
              yrange=yrange,
              showlegend=show_legend,
          )
      else:
          figure = main_fig
  
      return figure
  
imports: import plotly.graph_objs
  import numpy
  from plotly import subplots
  import matplotlib.pyplot
  from numbers import Number
  import logging
label_desc: Use image node_id 4 for calling a global function with example usage: plot_continuous_bar(data_dict, multiclass, show_error, title, xtitle, ytitle) and returns: figure, None, x, np