class_docstr: Overwrites default settings from matplotlib.pyplot.
  If a function is not overwritten, the default function will be used.
code: def legend(self, cols=1, loc=None, title=None, outside=False):
      kwargs = {
          "ncol": cols,
          "columnspacing": 0.8,
          "labelspacing": 0,
          "loc": loc,
          "fancybox": False,
          "framealpha": 0.8,
          "frameon": True,
          "borderaxespad": 0.4,
          "facecolor": "white",
          "title": title,
      }
  
      if loc is not None:
          kwargs["loc"] = loc
  
      if outside:
          kwargs.update({"loc": "upper left", "bbox_to_anchor": (1, 1)})
  
      legend = self.plt.legend(**kwargs)
      legend.set_zorder(500)
  
      if outside:
          legend.get_frame().set_linewidth(0.0)
          legend.get_frame().set_edgecolor("white")
      else:
          legend.get_frame().set_linewidth(0.5)
          legend.get_frame().set_edgecolor("gray")
  
file_path: SMAC3/benchmark/src/utils/styled_plot.py
imports: from distutils.spawn import find_executable
  import matplotlib
  import base64
  import io
  import matplotlib.pyplot
label_desc: Use image node_id 8 for calling the StyledPlot obj's underlying member method code with example usage: obj.legend(cols, loc, title, outside) without return types