code: def test_f1_score():
      rule0 = Rule("a > 0", (0, 0, 0))
      rule1 = Rule("a > 0", (0.5, 0.5, 0))
      rule2 = Rule("a > 0", (0.5, 0, 0))
  
      assert f1_score(rule0) == 0
      assert f1_score(rule1) == 0.5
      assert f1_score(rule2) == 0
  
imports: from imodels import SkopeRulesClassifier
  from imodels.util.prune import deduplicate, find_similar_rulesets, f1_score
  from imodels.util.rule import Rule
label_desc: Use image node_id 2 for calling a global function with example usage: test_f1_score() without return types