code: def plot_performance_curve(
      data_dict,
      title="",
      xtitle="",
      ytitle="",
      auc_prefix="",
      baseline=False,
  ):
      x_values = data_dict["x_values"]
      y_values = data_dict["y_values"]
      auc = data_dict["auc"]
      thresholds = data_dict["threshold"]
  
      width = 2
  
      auc_str = "{0} = {1:.4f}".format(auc_prefix, auc)
      auc_trace = go.Scatter(
          x=x_values,
          y=y_values,
          mode="lines",
          text=["Threshold ({0:.3f})".format(x) for x in thresholds],
          hoverinfo="text+x+y",
          line=dict(color="darkorange", width=width),
          name=auc_str,
          showlegend=False,
      )
      data = [auc_trace]
      if baseline:
          baseline_trace = go.Scatter(
              x=[0, 1],
              y=[0, 1],
              mode="lines",
              line=dict(color="navy", width=width, dash="dash"),
              showlegend=False,
          )
          data.append(baseline_trace)
  
      layout = go.Layout(
          title=auc_str,
          xaxis=dict(title=xtitle),
          yaxis=dict(title=ytitle),
          showlegend=False,
      )
  
      main_fig = go.Figure(data=data, layout=layout)
      title += "<br>" + auc_str
  
      # TODO: Remove this if threshold lines are never used.
      # # Add treshold line
      # figure = _plot_with_line(data_dict, main_fig,
      #                          title=title, xtitle=xtitle, ytitle=ytitle,
      #                          share_xaxis=True, line_name='Threshold')
      # figure['layout']['yaxis2'].update(range=[0.0, 1.0])
  
      density_fig = plot_density(data_dict["density"])
      figure = _two_plot(
          main_fig, density_fig, title=title, share_xaxis=False
      )
      figure["layout"]["xaxis2"].update(title="Absolute Residuals")
      figure["layout"]["yaxis2"].update(title="Density")
  
      figure["layout"]["xaxis1"].update(title=xtitle)
      figure["layout"]["yaxis1"].update(title=ytitle)
      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 3 for calling a global function with example usage: plot_performance_curve(data_dict, title, xtitle, ytitle, auc_prefix, baseline) and returns: figure