def SentencePieceTokenize(  # pylint: disable=invalid-name
    spm_path=None,
    extra_ids=0):
  """Returns a function that maps text to integer arrays."""
  return lambda g: sentencepiece_tokenize(  # pylint: disable=g-long-lambda
      g,
      spm_path=spm_path,
      extra_ids=extra_ids)
Returns a function that maps text to integer arrays.
trax/data/tf_inputs.py