code: def evaluate_model_and_store(name, pipe):
      result = cross_validate(
          pipe,
          X,
          y,
          scoring="neg_root_mean_squared_error",
          cv=n_cv_folds,
          return_train_score=True,
      )
      rmse_test_score = -result["test_score"]
      rmse_train_score = -result["train_score"]
      results.append(
          {
              "preprocessor": name,
              "rmse_test_mean": rmse_test_score.mean(),
              "rmse_test_std": rmse_train_score.std(),
              "rmse_train_mean": rmse_train_score.mean(),
              "rmse_train_std": rmse_train_score.std(),
          }
      )
  
file_path: scikit-learn/examples/preprocessing/plot_target_encoder.py
imports: from sklearn.datasets import fetch_openml
  from sklearn.compose import ColumnTransformer
  from sklearn.preprocessing import OneHotEncoder, OrdinalEncoder, TargetEncoder
  from sklearn.ensemble import HistGradientBoostingRegressor
  from sklearn.model_selection import cross_validate
  from sklearn.pipeline import make_pipeline
  import matplotlib.pyplot
  import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: evaluate_model_and_store(name, pipe) without return types