code: def _set_axis(self, traces, on=None, side="right", title=""):
      """
      Sets the axis in which each trace should appear
      If the axis doesn't exist then a new axis is created
  
      Parameters:
      -----------
              traces : list(str)
                      List of trace names
              on : string
                      The axis in which the traces should be placed.
                      If this is not indicated then a new axis will be
                      created
              side : string
                      Side where the axis will be placed
                              'left'
                              'right'
              title : string
                      Sets the title of the axis
                      Applies only to new axis
      """
      fig = {}
      fig_cpy = fig_to_dict(self).copy()
      fig["data"] = fig_cpy["data"]
      fig["layout"] = fig_cpy["layout"]
      fig = Figure(fig)
      traces = make_list(traces)
  
      def update_data(trace, y):
          anchor = (
              fig.axis["def"][y]["anchor"]
              if "anchor" in fig.axis["def"][y]
              else "x1"
          )
          idx = (
              fig.trace_dict[trace] if isinstance(trace, str) else trace
          )
          fig["data"][idx]["xaxis"] = anchor
          fig["data"][idx]["yaxis"] = y
  
      for trace in traces:
          if on:
              if on not in fig.axis["def"]:
                  raise Exception(
                      '"on" axis does not exists: {0}'.format(on)
                  )
              update_data(trace, y=on)
          else:
              curr_x, curr_y = fig.axis["ref"][trace]
              domain = (
                  "[0.0, 1.0]"
                  if "domain" not in fig.axis["def"][curr_y]
                  else str(fig.axis["def"][curr_y]["domain"])
              )
              try:
                  new_axis = fig.axis["dom"]["y"][domain][side]
              except KeyError:
                  axis = fig.axis["def"][curr_y].copy()
                  ### check overlaying values
                  axis.update(
                      title=title,
                      overlaying=curr_y,
                      side=side,
                      anchor=curr_x,
                  )
                  axis_idx = str(fig.axis["len"]["y"] + 1)
                  fig["layout"]["yaxis{0}".format(axis_idx)] = axis
                  new_axis = "y{0}".format(axis_idx)
              update_data(trace, y=new_axis)
  
      for k in list(fig.axis["def"].keys()):
          id = "{0}axis{1}".format(k[0], k[-1:])
          if k not in fig.axis["ref_axis"]:
              try:
                  del fig["layout"][id]
              except KeyError:
                  pass
  
      return fig
  
imports: import copy
  import numpy
  import pandas
  import plotly.offline
  import plotly.figure_factory
  from plotly.graph_objs import Figure, Scatter, Line
  from plotly.subplots import make_subplots
  from .None import themes
  from .None import auth, ta
  from .colors import normalize, to_rgba
  from .utils import check_kwargs, deep_update, dict_replace_keyword, kwargs_from_keyword, merge_dict, is_list, make_list
label_desc: Use image node_id 23 for calling a global function with example usage: _set_axis(traces, on, side, title) and returns: fig