code: def train_result(param, dmat, num_rounds):
      result = {}
      xgb.train(
          param,
          dmat,
          num_rounds,
          evals=[(dmat, "train")],
          verbose_eval=False,
          evals_result=result,
      )
      return result
  
file_path: xgboost/tests/python/test_linear.py
imports: from hypothesis import given, note, settings, strategies
  import xgboost
  from xgboost import testing
label_desc: Use image node_id 1 for calling a global function with example usage: train_result(param, dmat, num_rounds) and returns: result