code: def _binarize_evals(evals):
      """binarize evaluation labels"""
      bin_evals = []
      for evalset in evals:
          # binarize labels in xgb.dmatrix copy
          barray = evalset[0].get_data().copy()
          blabel = evalset[0].get_label().copy()
          blabel[blabel < 0.5] = 0.0
          blabel[blabel >= 0.5] = 1.0
          # pylint: disable=R1721
          bin_evals.append(
              tuple(
                  [xgb.DMatrix(barray, blabel)]
                  + [e for e in evalset[1:]]
              )
          )
      return bin_evals
  
imports: import logging
  import time
  from typing import Dict
  import numpy
  from tvm.contrib.popen_pool import PopenPoolExecutor, StatusKind
  from ..None import feature
  from ..utils import get_rank
  from .metric import cover_curve, max_curve, recall_curve
  from .model_based_tuner import CostModel, FeatureCache
label_desc: Use image node_id 8 for calling a global function with example usage: _binarize_evals(evals) and returns: bin_evals