code: def lsreg(x, y):
      x = np.asarray(x)
      y = np.asarray(y)
      res = stats.linregress(x, y)
      return res[0], res[1]
  
imports: from pyalgotrade import technical
  from pyalgotrade.utils import collections
  from pyalgotrade.utils import dt
  import numpy
  from scipy import stats
label_desc: Use image node_id 1 for calling a global function with example usage: lsreg(x, y) and returns: res,  res