code: def test_StackingClassifier_avg_vs_concat():
      np.random.seed(123)
      lr1 = LogisticRegression(solver="liblinear", multi_class="ovr")
      sclf1 = StackingClassifier(
          classifiers=[lr1, lr1],
          use_probas=True,
          average_probas=True,
          meta_classifier=lr1,
      )
  
      sclf1.fit(X, y)
      r1 = sclf1.predict_meta_features(X[:2])
      assert r1.shape == (2, 3)
      assert_almost_equal(np.sum(r1[0]), 1.0, decimal=6)
      assert_almost_equal(np.sum(r1[1]), 1.0, decimal=6)
  
      sclf2 = StackingClassifier(
          classifiers=[lr1, lr1],
          use_probas=True,
          average_probas=False,
          meta_classifier=lr1,
      )
  
      sclf2.fit(X, y)
      r2 = sclf2.predict_meta_features(X[:2])
      assert r2.shape == (2, 6)
      assert_almost_equal(np.sum(r2[0]), 2.0, decimal=6)
      assert_almost_equal(np.sum(r2[1]), 2.0, decimal=6)
      np.array_equal(r2[0][:3], r2[0][3:])
  
imports: import random
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal
  from packaging.version import Version
  from scipy import sparse
  from sklearn import __version__
  from sklearn import exceptions
  from sklearn.base import clone
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.linear_model import LogisticRegression, PassiveAggressiveClassifier
  from sklearn.model_selection import GridSearchCV, cross_val_score, train_test_split
  from sklearn.naive_bayes import GaussianNB
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.svm import SVC
  from mlxtend.classifier import StackingClassifier
  from mlxtend.data import iris_data
  from mlxtend.externals.estimator_checks import NotFittedError
  from mlxtend.utils import assert_raises
label_desc: Use image node_id 9 for calling a global function with example usage: test_StackingClassifier_avg_vs_concat() without return types