code: def test_training_size():
      iris = datasets.load_iris()
      X = iris.data
      y = iris.target
      X_train, X_test, y_train, y_test = train_test_split(
          X, y, test_size=0.4, random_state=2
      )
  
      clf = DecisionTreeClassifier(max_depth=1, random_state=1)
      training_errors, test_errors = plot_learning_curves(
          X_train, y_train, X_test, y_test, clf, suppress_plot=True
      )
  
      desired1 = [
          0.22,
          0.22,
          0.22,
          0.31,
          0.31,
          0.3,
          0.33,
          0.32,
          0.33,
          0.32,
      ]
      desired2 = [
          0.45,
          0.45,
          0.35,
          0.35,
          0.45,
          0.43,
          0.35,
          0.35,
          0.35,
          0.35,
      ]
  
      np.testing.assert_almost_equal(
          training_errors, desired1, decimal=2
      )
      np.testing.assert_almost_equal(test_errors, desired2, decimal=2)
  
imports: import numpy
  from sklearn import datasets
  from sklearn.model_selection import train_test_split
  from sklearn.tree import DecisionTreeClassifier
  from mlxtend.plotting import plot_learning_curves
label_desc: Use image node_id 1 for calling a global function with example usage: test_training_size() without return types