code: def test_sequence_label_encoder_half():
      encoder = SequenceLabelingEncoder(pad_token="<PAD>")
      labels = [{"start": 0, "end": 3, "label": "z", "text": "str"}]
      encoder.fit([labels])
      out = EncodedOutput(
          token_ids=np.array([0, 8660, 2]),
          tokens=np.array(["0", "stream", "2"], dtype="<U21"),
          token_ends=np.array([-1, 6, -1]),
          token_starts=np.array([-1, 0, -1]),
          useful_start=0,
          useful_end=512,
          input_text=["stream"],
      )
      label_arr = encoder.transform(out, labels)
      assert label_arr == [0, 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 4 for calling a global function with example usage: test_sequence_label_encoder_half() without return types