code: def test_t5_joint_tagging(self):
      model = JointS2S(base_model=HFT5, n_epochs=16)
      text = (
          "five percent (5%) \n "
          + "fifty percent (50%) \n "
          + "two percent (2%) \n "
          + "nine percent (9%) \n "
          + "three percent (3%) \n "
      )
      labels = [
          {
              "start": 0,
              "end": 17,
              "label": "a",
              "text": "five percent (5%)",
          },
          {
              "start": 20,
              "end": 39,
              "label": "b",
              "text": "fifty percent (50%)",
          },
          {
              "start": 42,
              "end": 58,
              "label": "a",
              "text": "two percent (2%)",
          },
          {
              "start": 61,
              "end": 78,
              "label": "b",
              "text": "nine percent (9%)",
          },
          {
              "start": 81,
              "end": 99,
              "label": "a",
              "text": "three percent (3%)",
          },
      ]
      groups = [
          {
              "spans": [
                  {
                      "start": 0,
                      "end": 39,
                      "text": "five percent (5%) \n fifty percent (50%)",
                  },
              ],
              "label": None,
          },
          {
              "spans": [
                  {
                      "start": 61,
                      "end": 99,
                      "text": "nine percent (9%) \n three percent (3%)",
                  },
              ],
              "label": None,
          },
      ]
      all_labels = (labels, groups)
      model.fit([text] * 30, [all_labels] * 30)
      label_preds, group_preds = model.predict([text])[0]
      self.assertEqual(len(label_preds), 5)
      self.assertEqual(labels, label_preds)
      self.assertEqual(len(group_preds), 2)
      self.assertEqual(groups, group_preds)
  
imports: import os
  import unittest
  import logging
  from copy import copy
  from pathlib import Path
  import codecs
  import json
  import random
  import time
  import pytest
  from pytest import approx
  import tensorflow
  import numpy
  from finetune.base_models.huggingface.models import HFT5
  from finetune.target_models.grouping import GroupSequenceLabeler, PipelineSequenceLabeler, MultiCRFGroupSequenceLabeler, MultiLogitGroupSequenceLabeler, BROSLabeler, JointBROSLabeler, GroupRelationLabeler, JointGroupRelationLabeler, SequenceS2S, GroupS2S, JointS2S
label_desc: Use image node_id 11 for calling the TestGroupingLabelers obj's underlying member method code with example usage: obj.test_t5_joint_tagging() without return types