code: def test_macro_f1(simple_confusion, short_confusion):
      assert confusion_to_macro_f1(simple_confusion) == pytest.approx(
          0.466666666666
      )
      assert confusion_to_macro_f1(short_confusion) == pytest.approx(
          0.277777777777
      )
  
file_path: stanza/stanza/tests/common/test_confusion.py
imports: from collections import defaultdict
  import pytest
  from stanza.utils.confusion import format_confusion, confusion_to_f1, confusion_to_macro_f1, confusion_to_weighted_f1
label_desc: Use image node_id 6 for calling a global function with example usage: test_macro_f1(simple_confusion, short_confusion) without return types