code: # For this basic implementation, we only need these modules
  from sklearn.datasets import load_breast_cancer
  from sklearn.model_selection import train_test_split
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.ensemble import BaggingClassifier
  
  # Load the well-known Breast Cancer dataset
  # Split into train and test sets
  x, y = load_breast_cancer(return_X_y=True)
  x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.25, random_state=23)
  
  # For simplicity, we are going to use as base estimator a Decision Tree with fixed parameters
  tree = DecisionTreeClassifier(max_depth=3, random_state=23)
  
  # The baggging ensemble classifier is initialized with:
  # base_estimator = DecisionTree
  # n_estimators = 5 : it's gonna be created 5 subsets to train 5 Decision Tree models
  # max_samples = 50 : it's gonna be taken randomly 50 items with replacement
  # bootstrap = True : means that the sampling is gonna be with replacement
  bagging = BaggingClassifier(base_estimator=tree, n_estimators=5, max_samples=50, bootstrap=True)
  
  # Training
  bagging.fit(x_train, y_train)
  
  # Evaluating
  print(f"Train score: {bagging.score(x_train, y_train)}")
  print(f"Test score: {bagging.score(x_test, y_test)}")
  
apis: sklearn.tree.DecisionTreeClassifier sklearn.datasets.load_breast_cancer sklearn.model_selection.train_test_split sklearn.ensemble.BaggingClassifier