code: def test_balanced_random_forest_pruning(imbalanced_dataset):
      brf = BalancedRandomForestClassifier(
          sampling_strategy="all", replacement=True, bootstrap=False
      )
      brf.fit(*imbalanced_dataset)
      n_nodes_no_pruning = brf.estimators_[0].tree_.node_count
  
      brf_pruned = BalancedRandomForestClassifier(
          ccp_alpha=0.015,
          sampling_strategy="all",
          replacement=True,
          bootstrap=False,
      )
      brf_pruned.fit(*imbalanced_dataset)
      n_nodes_pruning = brf_pruned.estimators_[0].tree_.node_count
  
      assert n_nodes_no_pruning > n_nodes_pruning
  
imports: import numpy
  import pytest
  import sklearn
  from sklearn.datasets import load_iris, make_classification
  from sklearn.model_selection import GridSearchCV, train_test_split
  from sklearn.utils._testing import assert_allclose, assert_array_equal
  from sklearn.utils.fixes import parse_version
  from imblearn.ensemble import BalancedRandomForestClassifier
label_desc: Use image node_id 9 for calling a global function with example usage: test_balanced_random_forest_pruning(imbalanced_dataset) without return types