def check_threshold(birch_instance, threshold):
 current_leaf = birch_instance.dummy_leaf_.next_leaf_
 while current_leaf:
  subclusters = current_leaf.subclusters_
  for sc in subclusters:
   assert_greater_equal(threshold, sc.radius)
  current_leaf = current_leaf.next_leaf_

def check_threshold ( birch_instance , threshold ) : current_leaf = birch_instance . dummy_leaf_ . next_leaf_ while current_leaf : subclusters = current_leaf . subclusters_ for sc in subclusters : assert_greater_equal ( threshold , sc . radius ) current_leaf = current_leaf . next_leaf_
use the leaf linked list for traversal .