code: def _norm_tokens(tokens: List[str], mask: List[int]) -> List[str]:
      """Replace special characters to _DUMMY to prevent tokens incrrectly matching."""
      assert len(tokens) == len(mask)
      ret: List[str] = []
      for token, mi in zip(tokens, mask):
          if int(mi):
              ret.append(_DUMMY)
          else:
              ret.append(token.replace(_DUMMY, ""))
      return ret
  
imports: from dataclasses import asdict, dataclass
  from pathlib import Path
  from typing import Any, ClassVar, Dict, List, Optional, Tuple
  import textspan
  import torch
  from camphr.doc import Doc, Ent
  from camphr.nlp import Nlp
  from camphr.serde import SerDe, SerDeDataclassMixin
  from transformers import AutoModelForTokenClassification, AutoTokenizer
  from typing_extensions import TypedDict
label_desc: Use image node_id 1 for calling a global function with example usage: _norm_tokens(tokens, mask) and returns: ret