code: def bench(factory, X, Y, X_test, Y_test, ref_coef):
      gc.collect()
  
      # start time
      tstart = time()
      clf = factory(alpha=alpha).fit(X, Y)
      delta = time() - tstart
      # stop time
  
      print("duration: %0.3fs" % delta)
      print("rmse: %f" % rmse(Y_test, clf.predict(X_test)))
      print(
          "mean coef abs diff: %f"
          % abs(ref_coef - clf.coef_.ravel()).mean()
      )
      return delta
  
imports: import gc
  from time import time
  import numpy
  from sklearn.datasets import make_regression
label_desc: Use image node_id 2 for calling a global function with example usage: bench(factory, X, Y, X_test, Y_test, ref_coef) and returns: delta