code: def token_to_char(text: str, sep=" ") -> np.ndarray:
      """Takes a string, space tokenizes the string, and returns a mapping from tokens to chars.
  
      Examples:
          >>> token_to_char("testing 1, 2, 3")
          # produces a (m) token by (M) char matrix:
  
                     t e s t i n g   1 ,   2 ,   3
           testing [[1 1 1 1 1 1 1 0 0 0 0 0 0 0 0]
                1,  [0 0 0 0 0 0 0 0 1 1 0 0 0 0 0]
                2,  [0 0 0 0 0 0 0 0 0 0 0 1 1 0 0]
                3   [0 0 0 0 0 0 0 0 0 0 0 0 0 0 1]]
  
      Args:
          text (str): string to tokenize and build the token to char mapping.
  
      Returns:
          np.ndarray mapping from (m) tokens to (M) chars.
  
      """
      spans = string_span_tokenize(text, sep=sep)
      return _mat_from_spans_dense(tuple(spans), len(text))
  
file_path: jiant/jiant/utils/retokenize.py
imports: from typing import Iterable, Sequence, Tuple, Union
  from Levenshtein.StringMatcher import StringMatcher
  from nltk.tokenize.util import string_span_tokenize
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: token_to_char(text, sep) and returns: _mat_from_spans_dense