class_docstr: Version of parlai.utils.bpe.Gpt2BpeHelper that can be TorchScripted.
class_docstr_tok: ["Version","of","parlai.utils.bpe.Gpt2BpeHelper","that","can","be","TorchScripted","."]
docstr: Tokenize text.
  
  :param text:
      text to tokenize
  
  :return tokens:
      A list of tokens
docstr_tok: ["Tokenize","text",".",":","param","text",":","text","to","tokenize",":","return","tokens",":","A","list","of","tokens"]
code: def helper_encode(self, text: str) -> List[str]:
      """
      Tokenize text.
  
      :param text:
          text to tokenize
  
      :return tokens:
          A list of tokens
      """
      bpe_tokens: List[str] = []
      for token in self.findall(text):
          byte_encoded: List[str] = []
          for b in token:
              byte_encoded.append(self.byte_encoder[ord(b)])
          encoded: List[str] = []
          for bpe_token in self.bpe(byte_encoded):
              encoded.append(self.encoder[bpe_token])
          bpe_tokens.extend(encoded)
      return bpe_tokens
  
imports: from typing import Dict, List, Tuple
  import torch.jit
label_desc: Use image node_id 6 for calling the ScriptableGpt2BpeHelper obj's underlying member method code with example usage: obj.helper_encode(text) and returns: bpe_tokens