code: def add_legend(location, orientation, side):
      legend = Legend(
          # TODO: title
          items=[("line", [line]), ("circle", [circle])],
          location=location,
          orientation=orientation,
          border_line_color="black",
          title="Example Title",
      )
      plot.add_layout(legend, side)
  
imports: from numpy import cos, linspace, pi, sin
  from bokeh.core.enums import LegendLocation
  from bokeh.io import show
  from bokeh.models import ColumnDataSource, DataRange1d, Legend, Line, LinearAxis, PanTool, Plot, SaveTool, Scatter, WheelZoomTool
label_desc: Use image node_id 1 for calling a global function with example usage: add_legend(location, orientation, side) without return types