code: def attr(self, key):
          
          ret = ctypes.c_char_p()
          success = ctypes.c_int()
          _check_call(_LIB.XGBoosterGetAttr(
              self.handle, c_str(key), ctypes.byref(ret), ctypes.byref(success)))
          if success.value != 0:
              return py_str(ret.value)
          return None
docs: Get attribute string from the Booster.
  
          Parameters
          ----------
          key : str
              The key to get attribute from.
  
          Returns
          -------
          value : str
              The attribute value of the key, returns None if attribute do not exist.