code: def test_iter_leaves():
      tree = BinaryBranch(
          BinaryBranch(Leaf(no=1), Leaf(no=2)), Leaf(no=3)
      )
  
      for i, leaf in enumerate(tree.iter_leaves(), start=1):
          assert i == leaf.no
  
file_path: river/river/tree/test_base.py
imports: from __future__ import annotations
  from river.tree.base import Branch, Leaf
label_desc: Use image node_id 5 for calling a global function with example usage: test_iter_leaves() without return types