code: def run(X_train, X_test, y_train, y_test, model):
      """Train model and predict result"""
      model.fit(X_train, y_train)
      predict_y = model.predict(X_test)
      score = r2_score(y_test, predict_y)
      LOG.debug("r2 score: %s", score)
      nni.report_final_result(score)
  
file_path: nni/examples/trials/sklearn/regression/main.py
imports: import nni
  from sklearn.datasets import load_diabetes
  from sklearn.model_selection import train_test_split
  from sklearn import linear_model
  import logging
  import numpy
  from sklearn.metrics import r2_score
  from sklearn.preprocessing import StandardScaler
  from sklearn.linear_model import LinearRegression
  from sklearn.linear_model import Ridge
  from sklearn.linear_model import Lars
  from sklearn.linear_model import ARDRegression
label_desc: Use image node_id 4 for calling a global function with example usage: run(X_train, X_test, y_train, y_test, model) without return types