code: def test_glm(self):
      param = {
          "silent": 1,
          "objective": "binary:logistic",
          "booster": "gblinear",
          "alpha": 0.0001,
          "lambda": 1,
      }
      watchlist = [(dtest, "eval"), (dtrain, "train")]
      num_round = 4
      bst = xgb.train(param, dtrain, num_round, watchlist)
      assert isinstance(bst, xgb.core.Booster)
      preds = bst.predict(dtest)
      labels = dtest.get_label()
      err = sum(
          1
          for i in range(len(preds))
          if int(preds[i] > 0.5) != labels[i]
      ) / float(len(preds))
      assert err < 0.1
  
file_path: turicreate/src/external/xgboost/tests/python/test_models.py
imports: import numpy
  import xgboost
  import unittest
label_desc: Use image node_id 1 for calling the TestModels obj's underlying member method code with example usage: obj.test_glm() without return types