code: def run(lgb_train, lgb_eval, params, X_test, y_test):
      print("Start training...")
  
      params["num_leaves"] = int(params["num_leaves"])
  
      # train
      gbm = lgb.train(
          params,
          lgb_train,
          num_boost_round=20,
          valid_sets=lgb_eval,
          early_stopping_rounds=5,
      )
  
      print("Start predicting...")
  
      # predict
      y_pred = gbm.predict(X_test, num_iteration=gbm.best_iteration)
  
      # eval
      rmse = mean_squared_error(y_test, y_pred) ** 0.5
      print("The rmse of prediction is:", rmse)
  
      nni.report_final_result(rmse)
  
file_path: nni/examples/trials/auto-gbdt/main.py
imports: import logging
  import lightgbm
  import pandas
  from sklearn.metrics import mean_squared_error
  import nni
label_desc: Use image node_id 3 for calling a global function with example usage: run(lgb_train, lgb_eval, params, X_test, y_test) without return types