code: def test_pickle():
      # Check pickability.
      import pickle
  
      # Adaboost classifier
      for alg in ["SAMME", "SAMME.R"]:
          obj = AdaBoostClassifier(algorithm=alg)
          obj.fit(iris.data, iris.target)
          score = obj.score(iris.data, iris.target)
          s = pickle.dumps(obj)
  
          obj2 = pickle.loads(s)
          assert type(obj2) == obj.__class__
          score2 = obj2.score(iris.data, iris.target)
          assert score == score2
  
      # Adaboost regressor
      obj = AdaBoostRegressor(random_state=0)
      obj.fit(diabetes.data, diabetes.target)
      score = obj.score(diabetes.data, diabetes.target)
      s = pickle.dumps(obj)
  
      obj2 = pickle.loads(s)
      assert type(obj2) == obj.__class__
      score2 = obj2.score(diabetes.data, diabetes.target)
      assert score == score2
  
imports: import re
  import numpy
  import pytest
  from sklearn import datasets
  from sklearn.base import BaseEstimator, clone
  from sklearn.dummy import DummyClassifier, DummyRegressor
  from sklearn.ensemble import AdaBoostClassifier, AdaBoostRegressor
  from sklearn.ensemble._weight_boosting import _samme_proba
  from sklearn.linear_model import LinearRegression
  from sklearn.model_selection import GridSearchCV, train_test_split
  from sklearn.svm import SVC, SVR
  from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
  from sklearn.utils import shuffle
  from sklearn.utils._mocking import NoSampleWeightWrapper
  from sklearn.utils._testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_array_less
  from sklearn.utils.fixes import COO_CONTAINERS, CSC_CONTAINERS, CSR_CONTAINERS, DOK_CONTAINERS, LIL_CONTAINERS
label_desc: Use image node_id 9 for calling a global function with example usage: test_pickle() without return types