code: def test_sequence_label_encoder():
      encoder = SequenceLabelingEncoder(pad_token="<PAD>")
      labels = [{"start": 13, "end": 17, "label": "z", "text": "(5%)"}]
      encoder.fit([labels])
      out = EncodedOutput(
          token_ids=np.array([0, 9583, 139, 40, 249, 8875, 2]),
          tokens=np.array(
              ["0", "five", " percent", " (", "5", "%)", "2"],
              dtype="<U21",
          ),
          token_ends=np.array([-1, 4, 12, 14, 15, 17, -1]),
          token_starts=np.array([-1, 0, 5, 13, 14, 15, -1]),
          useful_start=0,
          useful_end=512,
          input_text=["five percent (5%)"],
      )
      label_arr = encoder.transform(out, labels)
      assert label_arr == [0, 0, 0, 1, 1, 1, 0]
  
file_path: finetune/tests/test_sequence_labeling_encoder.py
imports: import numpy
  from finetune.encoding.input_encoder import EncodedOutput
  from finetune.encoding.target_encoders import SequenceLabelingEncoder
label_desc: Use image node_id 1 for calling a global function with example usage: test_sequence_label_encoder() without return types