class_docstr: A global context to hold additional attributes of xgb.DMatrix
class_docstr_tok: ["A","global","context","to","hold","additional","attributes","of","xgb.DMatrix"]
docstr: Get an attribute of a xgb.DMatrix
  Parameters
  ----------
  key: str
      The name of the attribute
  matrix: xgb.DMatrix
      The matrix
  default: Optional[Any]
      The default value if the item does not exist
docstr_tok: ["Get","an","attribute","of","a","xgb.DMatrix","Parameters","--","--","--","--","--","key",":","str","The","name","of","the","attribute","matrix",":","xgb.DMatrix","The","matrix","default",":","Optional","[","Any","]","The","default","value","if","the","item","does","not","exist"]
code: def get(self, key, matrix, default=None):
      """
      Get an attribute of a xgb.DMatrix
      Parameters
      ----------
      key: str
          The name of the attribute
      matrix: xgb.DMatrix
          The matrix
      default: Optional[Any]
          The default value if the item does not exist
      """
      return self.context_dict[key].get(matrix.handle.value, default)
  
imports: import multiprocessing
  import logging
  from typing import Dict
  from collections import defaultdict
  import numpy
  from tvm.autotvm.tuner.metric import max_curve
  from .cost_model import PythonBasedModel
  from ..feature import get_per_store_features_from_measure_pairs, get_per_store_features_from_states
  from ..measure_record import RecordReader
label_desc: Use image node_id 2 for calling the XGBDMatrixContext obj's underlying member method code with example usage: obj.get(key, matrix, default) and returns: self