code: def test_group_token_counts(self):
      # Count tuples are of the form (TP, FP, FN)
      # All pred tokens are false positives and all ground truth tokens are
      # false negatives when labels are mismatched
  
      # The group to compare against
      base_group = "group_a"
  
      self.check_token_counts("group_a", base_group, (19, 0, 0))
      self.check_token_counts("group_a_nl", base_group, (0, 19, 19))
  
      self.check_token_counts("group_b", base_group, (0, 12, 19))
      self.check_token_counts("group_b_nl", base_group, (0, 12, 19))
  
      # Note", the tokens "two percent" appear in several text spans of the
      # overlap and superset groups, and are therefore counted as false
      # positives multiple times
  
      self.check_token_counts("group_overlap", base_group, (11, 20, 8))
      self.check_token_counts(
          "group_overlap_nl", base_group, (0, 31, 19)
      )
  
      self.check_token_counts("group_superset", base_group, (19, 17, 0))
      self.check_token_counts(
          "group_superset_nl", base_group, (0, 36, 19)
      )
  
      self.check_token_counts("group_tokens", base_group, (5, 4, 14))
      self.check_token_counts("group_tokens_nl", base_group, (0, 9, 19))
  
      self.check_token_counts("group_all", base_group, (19, 16, 0))
      self.check_token_counts("group_all_nl", base_group, (0, 35, 19))
  
imports: import unittest
  from copy import deepcopy
  from finetune.util.group_metrics import get_count_fn, calc_group_assignment, create_joint_groups, get_metrics, group_metrics, joint_metrics
label_desc: Use image node_id 6 for calling the TestGroupMetricCountFunctions obj's underlying member method code with example usage: obj.test_group_token_counts() without return types