code: def create_line_plot(
      title,
      series,
      xtitle,
      ytitle,
      mode="lines",
      reverse_xaxis=False,
      comment=None,
      MAX_SIZE=None,
      layout_config=None,
  ):
      plotly_obj = _plotly_scatter_layout_dict(
          title=title
          if not comment
          else (title + "<br><sup>" + comment + "</sup>"),
          xaxis_title=xtitle,
          yaxis_title=ytitle,
      )
  
      if reverse_xaxis:
          plotly_obj["layout"]["xaxis"]["autorange"] = "reversed"
  
      # check maximum size of data
      MAX_SIZE = MAX_SIZE or 800000
      series_sizes = [s.data.size for s in series]
      total_size = sum(series_sizes)
      if total_size > MAX_SIZE:
          # we need to downscale
          base_size = MAX_SIZE / len(series_sizes)
          baseused_size = sum([min(s, base_size) for s in series_sizes])
          leftover = MAX_SIZE - baseused_size
          for s in series:
              # if we need to down-sample, use low-pass average filter and sampling
              if s.data.size >= base_size:
                  budget = base_size
                  # if we have some leftover in the budget, split based on series sizes
                  if leftover > 0:
                      # calculate the relative overflow  of this series compared to all the overflows
                      # then multiply it by the leftover budget
                      budget += int(
                          leftover
                          * s.data.size
                          / (total_size - baseused_size)
                      )
                  step = int(np.ceil(s.data.size / float(budget)))
                  x = s.data[:, 0][::-step][::-1]
                  y = s.data[:, 1]
                  y_low_pass = np.convolve(
                      y,
                      np.ones(shape=(step,), dtype=y.dtype)
                      / float(step),
                      mode="same",
                  )
                  y = y_low_pass[::-step][::-1]
                  s.data = np.array([x, y], dtype=s.data.dtype).T
  
              # decide on number of points between mean and max
              s_max = np.max(np.abs(s.data), axis=0)
              s_max = np.maximum(s_max, s_max * 0 + 0.01)
              digits = np.maximum(
                  np.array([1, 1]),
                  np.array([6, 6]) - np.floor(np.abs(np.log10(s_max))),
              )
              s.data[:, 0] = np.round(s.data[:, 0], int(digits[0]))
              s.data[:, 1] = np.round(s.data[:, 1], int(digits[1]))
  
      plotly_obj["data"].extend(
          {
              "name": s.name,
              "x": s.data[:, 0].tolist(),
              "y": s.data[:, 1].tolist(),
              "mode": mode,
              "text": s.labels,
              "type": "scatter",
          }
          for s in series
      )
  
      if layout_config:
          plotly_obj["layout"] = merge_dicts(
              plotly_obj["layout"], layout_config
          )
  
      return plotly_obj
  
imports: import json
  import numpy
  from ..errors import UsageError
  from ..utilities.dicts import merge_dicts
  from attr import attrs, attrib
label_desc: Use image node_id 3 for calling a global function with example usage: create_line_plot(title, series, xtitle, ytitle, mode, reverse_xaxis, comment, MAX_SIZE, layout_config) and returns: plotly_obj