code: def test_sklearn_api(self):
      from sklearn import datasets
      from sklearn.cross_validation import train_test_split
  
      np.random.seed(1)
  
      iris = datasets.load_iris()
      tr_d, te_d, tr_l, te_l = train_test_split(
          iris.data, iris.target, train_size=120
      )
  
      classifier = xgb.XGBClassifier()
      classifier.fit(tr_d, tr_l)
  
      preds = classifier.predict(te_d)
      labels = te_l
      err = sum([1 for p, l in zip(preds, labels) if p != l]) / len(
          te_l
      )
      # error must be smaller than 10%
      assert err < 0.1
  
file_path: turicreate/src/external/xgboost/tests/python/test_basic.py
imports: import numpy
  import xgboost
  import unittest
  import matplotlib
label_desc: Use image node_id 10 for calling the TestBasic obj's underlying member method code with example usage: obj.test_sklearn_api() without return types