code: def test_metric_config(self):
      # Make sure that the metric configuration happens in booster so the string
      # `['error', 'auc']` doesn't get passed down to core.
      dtrain, dtest = tm.load_agaricus(__file__)
      param = {
          "max_depth": 2,
          "eta": 1,
          "objective": "binary:logistic",
          "eval_metric": ["error", "auc"],
      }
      watchlist = [(dtest, "eval"), (dtrain, "train")]
      num_round = 2
      booster = xgb.train(param, dtrain, num_round, evals=watchlist)
      predt_0 = booster.predict(dtrain)
      with tempfile.TemporaryDirectory() as tmpdir:
          path = os.path.join(tmpdir, "model.json")
          booster.save_model(path)
  
          booster = xgb.Booster(params=param, model_file=path)
          predt_1 = booster.predict(dtrain)
          np.testing.assert_allclose(predt_0, predt_1)
  
imports: import json
  import os
  import pathlib
  import tempfile
  from pathlib import Path
  import numpy
  import pytest
  import xgboost
  from xgboost import testing
label_desc: Use image node_id 3 for calling the TestBasic obj's underlying member method code with example usage: obj.test_metric_config() without return types