code: def test_seq2seq_joint_label():
      model = HFS2S(base_model=HFT5)
      pipeline = HFS2S._get_input_pipeline(model)
      encoder = JointLabelingTextEncoder(pipeline, 512)
      text = "five percent (5%)"
      labels = [
          {"start": 0, "end": 4, "label": "z", "text": "five"},
          {"start": 5, "end": 8, "label": "z", "text": "per"},
          {"start": 13, "end": 17, "label": "z", "text": "(5%)"},
      ]
      groups = [
          {
              "spans": [
                  {"start": 5, "end": 8, "text": "per"},
                  {"start": 13, "end": 17, "text": "(5%)"},
              ],
              "label": None,
          },
          {
              "spans": [
                  {"start": 8, "end": 12, "text": "cent"},
              ],
              "label": None,
          },
      ]
      label_arr = encoder.transform([(labels, groups)])[0][0]
      assert isinstance(label_arr, np.ndarray)
      labels_out, groups_out = encoder.inverse_transform(
          [label_arr], [text]
      )[0]
      assert labels_out == labels
      assert groups_out == groups
  
file_path: finetune/tests/test_group_target_encoder.py
imports: import numpy
  import json
  from finetune.target_models.seq2seq import HFS2S
  from finetune.base_models.huggingface.models import HFT5
  from finetune.encoding.input_encoder import EncodedOutput
  from finetune.encoding.group_target_encoders import GroupSequenceLabelingEncoder, PipelineSequenceLabelingEncoder, MultiCRFGroupSequenceLabelingEncoder, BROSEncoder, JointBROSEncoder, GroupRelationEncoder, SequenceLabelingTextEncoder, GroupLabelingTextEncoder, JointLabelingTextEncoder
label_desc: Use image node_id 9 for calling a global function with example usage: test_seq2seq_joint_label() without return types