code: def test_group_assignment(self):
      # Simple tests, since the heavy lifting is done by the count fns
  
      count_fn = get_count_fn("group", "exact")
  
      correct_idxs = [(0, 0), (1, 1), (2, 2)]
      correct_counts = [
          [(1, 0, 0), (0, 1, 1), (0, 1, 1)],
          [(0, 1, 1), (1, 0, 0), (0, 1, 1)],
          [(0, 1, 1), (0, 1, 1), (1, 0, 0)],
      ]
      self.check_group_assignment(
          count_fn,
          self.base_groups,
          self.base_groups,
          correct_idxs,
          correct_counts,
      )
  
      correct_idxs = [(0, 2), (1, 1), (2, 0)]
      correct_counts = correct_counts[::-1]
      self.check_group_assignment(
          count_fn,
          self.base_groups,
          self.base_groups[::-1],
          correct_idxs,
          correct_counts,
      )
      # Assign idxs are sorted by pred idx, so correct values are the same
      self.check_group_assignment(
          count_fn,
          self.base_groups[::-1],
          self.base_groups,
          correct_idxs,
          correct_counts,
      )
  
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 2 for calling the TestGroupMetrics obj's underlying member method code with example usage: obj.test_group_assignment() without return types