code: def _extract_data_series(df, x, y):
      xs = np.array(df[x])
      ys = np.array(df[y])
      if xs.size != ys.size:
          raise Exception(
              "All data series in dataset must have equal size "
              "{x_col} : {x_len} {y_col} : {y_len}".format(
                  x_col=x, y_col=y, x_len=xs.size, y_len=ys.size
              )
          )
      if xs.size == 1:
          raise Exception("Data should have at least two points.")
  
      return xs, ys
  
file_path: lets-plot/python-package/lets_plot/bistro/residual.py
imports: from ..plot.core import PlotSpec, aes
  from ..plot.geom import geom_hline
  from ..plot.label import ylab
  from ..plot.theme_ import *
  from ._plot2d_common import _get_bin_params_2d, _get_geom2d_layer, _get_marginal_layers
label_desc: Use image node_id 1 for calling a global function with example usage: _extract_data_series(df, x, y) and returns: xs,  ys