docstr: Encodes a string into tokens, but do regex splitting in Python.
docstr_tok: ["Encodes","a","string","into","tokens",",","but","do","regex","splitting","in","Python","."]
code: def _encode_only_native_bpe(self, text: str) -> list[int]:
      """Encodes a string into tokens, but do regex splitting in Python."""
      _unused_pat = regex.compile(self._pat_str)
      ret = []
      for piece in regex.findall(_unused_pat, text):
          ret.extend(self._core_bpe.encode_single_piece(piece))
      return ret
  
imports: from __future__ import annotations
  import functools
  from concurrent.futures import ThreadPoolExecutor
  from typing import AbstractSet, Collection, Literal, NoReturn, Optional, Union
  import regex
  from tiktoken import _tiktoken
label_desc: Use image node_id 21 for calling the Encoding obj's underlying member method code with example usage: obj._encode_only_native_bpe(text) and returns: ret