code: def test_01_loss_bagging():
      X, y = iris_data()
      X_train, X_test, y_train, y_test = train_test_split(
          X,
          y,
          test_size=0.3,
          random_state=123,
          shuffle=True,
          stratify=y,
      )
  
      tree = DecisionTreeClassifier(random_state=123)
      bag = BaggingClassifier(base_estimator=tree, random_state=123)
      avg_expected_loss, avg_bias, avg_var = bias_variance_decomp(
          bag,
          X_train,
          y_train,
          X_test,
          y_test,
          loss="0-1_loss",
          random_seed=123,
      )
  
      assert round(avg_expected_loss, 3) == 0.048
      assert round(avg_bias, 3) == 0.022
      assert round(avg_var, 3) == 0.026
  
file_path: mlxtend/mlxtend/evaluate/tests/test_bias_variance_decomp.py
imports: import os
  import pandas
  import pytest
  from sklearn.ensemble import BaggingClassifier, BaggingRegressor
  from sklearn.model_selection import train_test_split
  from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
  from mlxtend.data import boston_housing_data, iris_data
  from mlxtend.evaluate import bias_variance_decomp
label_desc: Use image node_id 3 for calling a global function with example usage: test_01_loss_bagging() without return types