code: def test_branching_factor(global_random_seed, global_dtype):
      # Test that nodes have at max branching_factor number of subclusters
      X, y = make_blobs(random_state=global_random_seed)
      X = X.astype(global_dtype, copy=False)
      branching_factor = 9
  
      # Purposefully set a low threshold to maximize the subclusters.
      brc = Birch(
          n_clusters=None,
          branching_factor=branching_factor,
          threshold=0.01,
      )
      brc.fit(X)
      check_branching_factor(brc.root_, branching_factor)
      brc = Birch(
          n_clusters=3,
          branching_factor=branching_factor,
          threshold=0.01,
      )
      brc.fit(X)
      check_branching_factor(brc.root_, branching_factor)
  
imports: import numpy
  import pytest
  from sklearn.cluster import AgglomerativeClustering, Birch
  from sklearn.cluster.tests.common import generate_clustered_data
  from sklearn.datasets import make_blobs
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.metrics import pairwise_distances_argmin, v_measure_score
  from sklearn.utils._testing import assert_allclose, assert_array_equal
  from sklearn.utils.fixes import CSR_CONTAINERS
label_desc: Use image node_id 8 for calling a global function with example usage: test_branching_factor(global_random_seed, global_dtype) without return types