code: def test_eval_metric_with_validation():
      (train, valid, _) = dataset_prostate()
  
      model = H2OXGBoostEstimator(
          ntrees=10,
          max_depth=4,
          score_each_iteration=True,
          eval_metric="logloss",
          seed=123,
      )
      model.train(
          y="CAPSULE",
          x=train.names,
          training_frame=train,
          validation_frame=valid,
      )
  
      assert_same_scoring_history(
          model, "training_logloss", "training_custom"
      )
      assert_same_scoring_history(
          model, "validation_logloss", "validation_custom"
      )
  
imports: import sys
  from tests import pyunit_utils
  from tests.pyunit_utils import dataset_prostate
  from h2o.estimators.xgboost import H2OXGBoostEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: test_eval_metric_with_validation() without return types