code: def test_decode_bio(
      text: str,
      tokens: List[str],
      mask: List[int],
      labels: List[str],
      expected: Union[List[str], List[Tuple[str, str]]],
  ):
      ret = _decode_bio(text, tokens, mask, labels)
      assert ret.tokens is None
      assert ret.ents is not None
  
      a = [e.text for e in ret.ents]
      b = [(e.text, e.label) for e in ret.ents]
      assert a == expected or b == expected
  
file_path: camphr/packages/camphr_transformers/tests/test_ner.py
imports: from dataclasses import dataclass
  from hypothesis import strategies, given
  from pathlib import Path
  from typing import Dict, List, Literal, Tuple, Union
  from typing_extensions import TypeAlias
  from camphr.serde import from_disk, to_disk
  import pytest
  from camphr_transformers.ner import Ner, _decode_bio, _DUMMY
  from .utils import FIXTURE_DIR
label_desc: Use image node_id 7 for calling a global function with example usage: test_decode_bio(text, tokens, mask, labels, expected) without return types