






import warnings
from typing import Dict, List, Optional, Tuple

from ...tokenization_utils import AddedToken, PreTrainedTokenizer
from ...utils import logging


lowerCAmelCase_           = logging.get_logger(__name__)
class      UpperCamelCase (				SCREAMING_SNAKE_CASE__ ):







		"""simple docstring"""



		snake_case    =   ["input_ids", "attention_mask"]
		def __init__(  self		:       Union[str, Any]						,_SCREAMING_SNAKE_CASE		:       Tuple="</s>"						,_SCREAMING_SNAKE_CASE		:       Optional[int]="<unk>"						,_SCREAMING_SNAKE_CASE		:       str="<pad>"						,_SCREAMING_SNAKE_CASE		:       Dict=1_2_5						,_SCREAMING_SNAKE_CASE		:       Optional[int]=None						,**_SCREAMING_SNAKE_CASE		:       Union[str, Any]						,)    ->   None:


						'''simple docstring'''

						if extra_ids > 0 and additional_special_tokens is None:
										A	 =      [f'<extra_id_{i}>' for i in range(_lowercase		)]
						elif extra_ids > 0 and additional_special_tokens is not None:
										# Check that we have the right number of extra_id special tokens
										A	 =      len(set(filter(lambda _SCREAMING_SNAKE_CASE		: bool('extra_id' in str(_lowercase		)		)						,_lowercase		)		)		)
										if extra_tokens != extra_ids:
														raise ValueError(
														    f'Both extra_ids ({extra_ids}) and additional_special_tokens ({additional_special_tokens}) are'
														    ' provided to ByT5Tokenizer. In this case the additional_special_tokens must include the'
														    ' extra_ids tokens'		)

						A	 =      AddedToken(_lowercase						,lstrip=_lowercase						,rstrip=_lowercase		) if isinstance(_lowercase						,_lowercase		) else pad_token
						A	 =      AddedToken(_lowercase						,lstrip=_lowercase						,rstrip=_lowercase		) if isinstance(_lowercase						,_lowercase		) else eos_token
						A	 =      AddedToken(_lowercase						,lstrip=_lowercase						,rstrip=_lowercase		) if isinstance(_lowercase						,_lowercase		) else unk_token

						super().__init__(
						    eos_token=_lowercase						,unk_token=_lowercase						,pad_token=_lowercase						,extra_ids=_lowercase						,additional_special_tokens=_lowercase						,**_lowercase						,)

						A	 =      extra_ids

						A	 =      2**8  # utf is 8 bits

						# define special tokens dict
						A	 =      {
						    self.pad_token: 0,
						    self.eos_token: 1,
						    self.unk_token: 2,
						}
						A	 =      len(self.special_tokens_encoder		)
						A	 =      len(_lowercase		)
						for i, token in enumerate(_lowercase		):
										A	 =      self.vocab_size + i - n
						A	 =      {v: k for k, v in self.special_tokens_encoder.items()}
		@property
		def       A(  self		:       Tuple		)    ->   int:


						'''simple docstring'''
						return self._utf_vocab_size + self._num_special_tokens + self._extra_ids
		def       A(  self		:       Dict						,_SCREAMING_SNAKE_CASE		:       Union[str, Any]						,_SCREAMING_SNAKE_CASE		:       Optional[int] = None						,_SCREAMING_SNAKE_CASE		:       Union[str, Any] = False		)    ->   List[int]:


						'''simple docstring'''

						if already_has_special_tokens:
										return super().get_special_tokens_mask(
										    token_ids_a=_lowercase						,token_ids_a=_lowercase						,already_has_special_tokens=_lowercase		)

						# normal case: some special tokens
						if token_ids_a is None:
										return ([0] * len(_lowercase		)) + [1]
						return ([0] * len(_lowercase		)) + [1] + ([0] * len(_lowercase		)) + [1]
		def       A(  self		:       Tuple						,_SCREAMING_SNAKE_CASE		:       Tuple		)    ->   List[int]:


						'''simple docstring'''

						if len(_lowercase		) > 0 and token_ids[-1] == self.eos_token_id:
										warnings.warn(
										    f'This sequence already has {self.eos_token}. In future versions this behavior may lead to duplicated'
										    ' eos tokens being added.'		)
										return token_ids
						else:
										return token_ids + [self.eos_token_id]
		def       A(  self		:       Optional[int]						,_SCREAMING_SNAKE_CASE		:       int						,_SCREAMING_SNAKE_CASE		:       List[str] = None		)    ->   List[int]:


						'''simple docstring'''
						A	 =      [self.eos_token_id]

						if token_ids_a is None:
										return len(token_ids_a + eos		) * [0]
						return len(token_ids_a + eos + token_ids_a + eos		) * [0]
		def       A(  self		:       Optional[int]						,_SCREAMING_SNAKE_CASE		:       List[str]						,_SCREAMING_SNAKE_CASE		:       Union[str, Any] = None		)    ->   List[int]:


						'''simple docstring'''
						A	 =      self._add_eos_if_not_present(_lowercase		)
						if token_ids_a is None:
										return token_ids_a
						else:
										A	 =      self._add_eos_if_not_present(_lowercase		)
										return token_ids_a + token_ids_a
		def       A(  self		:       Dict						,_SCREAMING_SNAKE_CASE		:       Tuple		)    ->   List[str]:


						'''simple docstring'''
						A	 =      [chr(_lowercase		) for i in text.encode('utf-8'		)]
						return tokens
		def       A(  self		:       Union[str, Any]						,_SCREAMING_SNAKE_CASE		:       Dict		)    ->   int:


						'''simple docstring'''

						if token in self.special_tokens_encoder:
										A	 =      self.special_tokens_encoder[token]
						elif token in self.added_tokens_encoder:
										A	 =      self.added_tokens_encoder[token]
						elif len(_lowercase		) != 1:
										A	 =      self.unk_token_id
						else:
										A	 =      ord(_lowercase		) + self._num_special_tokens
						return token_id
		def       A(  self		:       Union[str, Any]						,_SCREAMING_SNAKE_CASE		:       List[str]		)    ->   Optional[Any]:


						'''simple docstring'''

						if index in self.special_tokens_decoder:
										A	 =      self.special_tokens_decoder[index]
						else:
										A	 =      chr(index - self._num_special_tokens		)
						return token
		def       A(  self		:       Tuple						,_SCREAMING_SNAKE_CASE		:       Optional[int]		)    ->   List[Any]:


						'''simple docstring'''
						A	 =      b""""""
						for token in tokens:
										if token in self.special_tokens_decoder:
														A	 =      self.special_tokens_decoder[token].encode('utf-8'		)
										elif token in self.added_tokens_decoder:
														A	 =      self.special_tokens_decoder[token].encode('utf-8'		)
										elif token in self.special_tokens_encoder:
														A	 =      token.encode('utf-8'		)
										elif token in self.added_tokens_encoder:
														A	 =      token.encode('utf-8'		)
										else:
														A	 =      bytes([ord(_lowercase		)]		)
										bstring += tok_string
						A	 =      bstring.decode('utf-8'						,errors='ignore'		)
						return string







		def       A(  self		:       List[str]						,_SCREAMING_SNAKE_CASE		:       int						,_SCREAMING_SNAKE_CASE		:       List[str] = None		)    ->   Tuple[str]:


						'''simple docstring'''
						return ()













import unittest

from transformers import JukeboxTokenizer
from transformers.testing_utils import require_torch
class      UpperCamelCase (				unittest.TestCase ):







		"""simple docstring"""



		snake_case    =   JukeboxTokenizer
		snake_case    =   {
		    "artist": "Zac Brown Band",
		    "genres": "Country",
		    "lyrics": "I met a traveller from an antique land,\n        Who said \"Two vast and trunkless legs of stone\n        Stand in the desert. . . . Near them, on the sand,\n        Half sunk a shattered visage lies, whose frown,\n        And wrinkled lip, and sneer of cold command,\n        Tell that its sculptor well those passions read\n        Which yet survive, stamped on these lifeless things,\n        The hand that mocked them, and the heart that fed;\n        And on the pedestal, these words appear:\n        My name is Ozymandias, King of Kings;\n        Look on my Works, ye Mighty, and despair!\n        Nothing beside remains. Round the decay\n        Of that colossal Wreck, boundless and bare\n        The lone and level sands stretch far away\n        ",
		}
		@require_torch
		def       A(  self		:       Optional[int]		)    ->   Any:


						'''simple docstring'''
						import torch

						A	 =      JukeboxTokenizer.from_pretrained('openai/jukebox-1b-lyrics'		)
						A	 =      tokenizer(**self.metas		)['input_ids']
						# fmt: off
						A	 =      [
						    torch.tensor([[
						        0, 0, 0, 7_1_6_9, 5_0_7, 9, 7_6, 3_9, 3_1, 4_6, 7_6, 2_7,
						        7_6, 4_6, 4_4, 2_7, 4_8, 3_1, 3_8, 3_8, 3_1, 4_4, 7_6, 3_2,
						        4_4, 4_1, 3_9, 7_6, 2_7, 4_0, 7_6, 2_7, 4_0, 4_6, 3_5, 4_3,
						        4_7, 3_1, 7_6, 3_8, 2_7, 4_0, 3_0, 6_4, 7_8, 7_6, 7_6, 7_6,
						        7_6, 7_6, 7_6, 7_6, 7_6, 2_3, 3_4, 4_1, 7_6, 4_5, 2_7, 3_5,
						        3_0, 7_6, 7_1, 2_0, 4_9, 4_1, 7_6, 4_8, 2_7, 4_5, 4_6, 7_6,
						        2_7, 4_0, 3_0, 7_6, 4_6, 4_4, 4_7, 4_0, 3_7, 3_8, 3_1, 4_5,
						        4_5, 7_6, 3_8, 3_1, 3_3, 4_5, 7_6, 4_1, 3_2, 7_6, 4_5, 4_6,
						        4_1, 4_0, 3_1, 7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6,
						        1_9, 4_6, 2_7, 4_0, 3_0, 7_6, 3_5, 4_0, 7_6, 4_6, 3_4, 3_1,
						        7_6, 3_0, 3_1, 4_5, 3_1, 4_4, 4_6, 6_3, 7_6, 6_3, 7_6, 6_3,
						        7_6, 6_3, 7_6, 1_4, 3_1, 2_7, 4_4, 7_6, 4_6, 3_4, 3_1, 3_9,
						        6_4, 7_6, 4_1, 4_0, 7_6, 4_6, 3_4, 3_1, 7_6, 4_5, 2_7, 4_0,
						        3_0, 6_4, 7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 8,
						        2_7, 3_8, 3_2, 7_6, 4_5, 4_7, 4_0, 3_7, 7_6, 2_7, 7_6, 4_5,
						        3_4, 2_7, 4_6, 4_6, 3_1, 4_4, 3_1, 3_0, 7_6, 4_8, 3_5, 4_5,
						        2_7, 3_3, 3_1, 7_6, 3_8, 3_5, 3_1, 4_5, 6_4, 7_6, 4_9, 3_4,
						        4_1, 4_5, 3_1, 7_6, 3_2, 4_4, 4_1, 4_9, 4_0, 6_4, 7_8, 7_6,
						        7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 1, 4_0, 3_0, 7_6, 4_9,
						        4_4, 3_5, 4_0, 3_7, 3_8, 3_1, 3_0, 7_6, 3_8, 3_5, 4_2, 6_4,
						        7_6, 2_7, 4_0, 3_0, 7_6, 4_5, 4_0, 3_1, 3_1, 4_4, 7_6, 4_1,
						        3_2, 7_6, 2_9, 4_1, 3_8, 3_0, 7_6, 2_9, 4_1, 3_9, 3_9, 2_7,
						        4_0, 3_0, 6_4, 7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6,
						        2_0, 3_1, 3_8, 3_8, 7_6, 4_6, 3_4, 2_7, 4_6, 7_6, 3_5, 4_6,
						        4_5, 7_6, 4_5, 2_9, 4_7, 3_8, 4_2, 4_6, 4_1, 4_4, 7_6, 4_9,
						        3_1, 3_8, 3_8, 7_6, 4_6, 3_4, 4_1, 4_5, 3_1, 7_6, 4_2, 2_7,
						        4_5, 4_5, 3_5, 4_1, 4_0, 4_5, 7_6, 4_4, 3_1, 2_7, 3_0, 7_8,
						        7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 2_3, 3_4, 3_5, 2_9,
						        3_4, 7_6, 5_1, 3_1, 4_6, 7_6, 4_5, 4_7, 4_4, 4_8, 3_5, 4_8,
						        3_1, 6_4, 7_6, 4_5, 4_6, 2_7, 3_9, 4_2, 3_1, 3_0, 7_6, 4_1,
						        4_0, 7_6, 4_6, 3_4, 3_1, 4_5, 3_1, 7_6, 3_8, 3_5, 3_2, 3_1,
						        3_8, 3_1, 4_5, 4_5, 7_6, 4_6, 3_4, 3_5, 4_0, 3_3, 4_5, 6_4,
						        7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 2_0, 3_4, 3_1,
						        7_6, 3_4, 2_7, 4_0, 3_0, 7_6, 4_6, 3_4, 2_7, 4_6, 7_6, 3_9,
						        4_1, 2_9, 3_7, 3_1, 3_0, 7_6, 4_6, 3_4, 3_1, 3_9, 6_4, 7_6,
						        2_7, 4_0, 3_0, 7_6, 4_6, 3_4, 3_1, 7_6, 3_4, 3_1, 2_7, 4_4,
						        4_6, 7_6, 4_6, 3_4, 2_7, 4_6, 7_6, 3_2, 3_1, 3_0, 6_6, 7_8,
						        7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 1, 4_0, 3_0, 7_6,
						        4_1, 4_0, 7_6, 4_6, 3_4, 3_1, 7_6, 4_2, 3_1, 3_0, 3_1, 4_5,
						        4_6, 2_7, 3_8, 6_4, 7_6, 4_6, 3_4, 3_1, 4_5, 3_1, 7_6, 4_9,
						        4_1, 4_4, 3_0, 4_5, 7_6, 2_7, 4_2, 4_2, 3_1, 2_7, 4_4, 6_5,
						        7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 1_3, 5_1, 7_6,
						        4_0, 2_7, 3_9, 3_1, 7_6, 3_5, 4_5, 7_6, 1_5, 5_2, 5_1, 3_9,
						        2_7, 4_0, 3_0, 3_5, 2_7, 4_5, 6_4, 7_6, 1_1, 3_5, 4_0, 3_3,
						        7_6, 4_1, 3_2, 7_6, 1_1, 3_5, 4_0, 3_3, 4_5, 6_6, 7_8, 7_6,
						        7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 1_2, 4_1, 4_1, 3_7, 7_6,
						        4_1, 4_0, 7_6, 3_9, 5_1, 7_6, 2_3, 4_1, 4_4, 3_7, 4_5, 6_4,
						        7_6, 5_1, 3_1, 7_6, 1_3, 3_5, 3_3, 3_4, 4_6, 5_1, 6_4, 7_6,
						        2_7, 4_0, 3_0, 7_6, 3_0, 3_1, 4_5, 4_2, 2_7, 3_5, 4_4, 6_7,
						        7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 1_4, 4_1, 4_6,
						        3_4, 3_5, 4_0, 3_3, 7_6, 2_8, 3_1, 4_5, 3_5, 3_0, 3_1, 7_6,
						        4_4, 3_1, 3_9, 2_7, 3_5, 4_0, 4_5, 6_3, 7_6, 1_8, 4_1, 4_7,
						        4_0, 3_0, 7_6, 4_6, 3_4, 3_1, 7_6, 3_0, 3_1, 2_9, 2_7, 5_1,
						        7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 1_5, 3_2, 7_6,
						        4_6, 3_4, 2_7, 4_6, 7_6, 2_9, 4_1, 3_8, 4_1, 4_5, 4_5, 2_7,
						        3_8, 7_6, 2_3, 4_4, 3_1, 2_9, 3_7, 6_4, 7_6, 2_8, 4_1, 4_7,
						        4_0, 3_0, 3_8, 3_1, 4_5, 4_5, 7_6, 2_7, 4_0, 3_0, 7_6, 2_8,
						        2_7, 4_4, 3_1, 7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6,
						        2_0, 3_4, 3_1, 7_6, 3_8, 4_1, 4_0, 3_1, 7_6, 2_7, 4_0, 3_0,
						        7_6, 3_8, 3_1, 4_8, 3_1, 3_8, 7_6, 4_5, 2_7, 4_0, 3_0, 4_5,
						        7_6, 4_5, 4_6, 4_4, 3_1, 4_6, 2_9, 3_4, 7_6, 3_2, 2_7, 4_4,
						        7_6, 2_7, 4_9, 2_7, 5_1, 7_8, 7_6, 7_6, 7_6, 7_6, 7_6, 7_6,
						        7_6, 7_6]]		),
						    torch.tensor([[0, 0, 0, 1_0_6_9, 1_1]]		),
						    torch.tensor([[0, 0, 0, 1_0_6_9, 1_1]]		),
						]
						# fmt: on
						self.assertTrue(torch.allclose(tokens[0]						,EXPECTED_OUTPUT[0]		)		)
						self.assertTrue(torch.allclose(tokens[1]						,EXPECTED_OUTPUT[1]		)		)
						self.assertTrue(torch.allclose(tokens[2]						,EXPECTED_OUTPUT[2]		)		)







		@require_torch
		def       A(  self		:       Tuple		)    ->   List[Any]:


						'''simple docstring'''
						import torch

						A	 =      JukeboxTokenizer.from_pretrained('openai/jukebox-5b-lyrics'		)
						A	 =      tokenizer(**self.metas		)['input_ids']
						# fmt: off
						A	 =      [
						    torch.tensor([[
						        0, 0, 0, 1_0_6_9, 1_1, -1, -1, -1, -1, 9, 7_7, 3_9,
						        3_1, 4_6, 7_7, 2_7, 7_7, 4_6, 4_4, 2_7, 4_8, 3_1, 3_8, 3_8,
						        3_1, 4_4, 7_7, 3_2, 4_4, 4_1, 3_9, 7_7, 2_7, 4_0, 7_7, 2_7,
						        4_0, 4_6, 3_5, 4_3, 4_7, 3_1, 7_7, 3_8, 2_7, 4_0, 3_0, 6_4,
						        7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 2_3, 3_4, 4_1,
						        7_7, 4_5, 2_7, 3_5, 3_0, 7_7, 7_2, 2_0, 4_9, 4_1, 7_7, 4_8,
						        2_7, 4_5, 4_6, 7_7, 2_7, 4_0, 3_0, 7_7, 4_6, 4_4, 4_7, 4_0,
						        3_7, 3_8, 3_1, 4_5, 4_5, 7_7, 3_8, 3_1, 3_3, 4_5, 7_7, 4_1,
						        3_2, 7_7, 4_5, 4_6, 4_1, 4_0, 3_1, 7_9, 7_7, 7_7, 7_7, 7_7,
						        7_7, 7_7, 7_7, 7_7, 1_9, 4_6, 2_7, 4_0, 3_0, 7_7, 3_5, 4_0,
						        7_7, 4_6, 3_4, 3_1, 7_7, 3_0, 3_1, 4_5, 3_1, 4_4, 4_6, 6_3,
						        7_7, 6_3, 7_7, 6_3, 7_7, 6_3, 7_7, 1_4, 3_1, 2_7, 4_4, 7_7,
						        4_6, 3_4, 3_1, 3_9, 6_4, 7_7, 4_1, 4_0, 7_7, 4_6, 3_4, 3_1,
						        7_7, 4_5, 2_7, 4_0, 3_0, 6_4, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7,
						        7_7, 7_7, 7_7, 8, 2_7, 3_8, 3_2, 7_7, 4_5, 4_7, 4_0, 3_7,
						        7_7, 2_7, 7_7, 4_5, 3_4, 2_7, 4_6, 4_6, 3_1, 4_4, 3_1, 3_0,
						        7_7, 4_8, 3_5, 4_5, 2_7, 3_3, 3_1, 7_7, 3_8, 3_5, 3_1, 4_5,
						        6_4, 7_7, 4_9, 3_4, 4_1, 4_5, 3_1, 7_7, 3_2, 4_4, 4_1, 4_9,
						        4_0, 6_4, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 1,
						        4_0, 3_0, 7_7, 4_9, 4_4, 3_5, 4_0, 3_7, 3_8, 3_1, 3_0, 7_7,
						        3_8, 3_5, 4_2, 6_4, 7_7, 2_7, 4_0, 3_0, 7_7, 4_5, 4_0, 3_1,
						        3_1, 4_4, 7_7, 4_1, 3_2, 7_7, 2_9, 4_1, 3_8, 3_0, 7_7, 2_9,
						        4_1, 3_9, 3_9, 2_7, 4_0, 3_0, 6_4, 7_9, 7_7, 7_7, 7_7, 7_7,
						        7_7, 7_7, 7_7, 7_7, 2_0, 3_1, 3_8, 3_8, 7_7, 4_6, 3_4, 2_7,
						        4_6, 7_7, 3_5, 4_6, 4_5, 7_7, 4_5, 2_9, 4_7, 3_8, 4_2, 4_6,
						        4_1, 4_4, 7_7, 4_9, 3_1, 3_8, 3_8, 7_7, 4_6, 3_4, 4_1, 4_5,
						        3_1, 7_7, 4_2, 2_7, 4_5, 4_5, 3_5, 4_1, 4_0, 4_5, 7_7, 4_4,
						        3_1, 2_7, 3_0, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7,
						        2_3, 3_4, 3_5, 2_9, 3_4, 7_7, 5_1, 3_1, 4_6, 7_7, 4_5, 4_7,
						        4_4, 4_8, 3_5, 4_8, 3_1, 6_4, 7_7, 4_5, 4_6, 2_7, 3_9, 4_2,
						        3_1, 3_0, 7_7, 4_1, 4_0, 7_7, 4_6, 3_4, 3_1, 4_5, 3_1, 7_7,
						        3_8, 3_5, 3_2, 3_1, 3_8, 3_1, 4_5, 4_5, 7_7, 4_6, 3_4, 3_5,
						        4_0, 3_3, 4_5, 6_4, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7,
						        7_7, 2_0, 3_4, 3_1, 7_7, 3_4, 2_7, 4_0, 3_0, 7_7, 4_6, 3_4,
						        2_7, 4_6, 7_7, 3_9, 4_1, 2_9, 3_7, 3_1, 3_0, 7_7, 4_6, 3_4,
						        3_1, 3_9, 6_4, 7_7, 2_7, 4_0, 3_0, 7_7, 4_6, 3_4, 3_1, 7_7,
						        3_4, 3_1, 2_7, 4_4, 4_6, 7_7, 4_6, 3_4, 2_7, 4_6, 7_7, 3_2,
						        3_1, 3_0, 6_6, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7,
						        1, 4_0, 3_0, 7_7, 4_1, 4_0, 7_7, 4_6, 3_4, 3_1, 7_7, 4_2,
						        3_1, 3_0, 3_1, 4_5, 4_6, 2_7, 3_8, 6_4, 7_7, 4_6, 3_4, 3_1,
						        4_5, 3_1, 7_7, 4_9, 4_1, 4_4, 3_0, 4_5, 7_7, 2_7, 4_2, 4_2,
						        3_1, 2_7, 4_4, 6_5, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7,
						        7_7, 1_3, 5_1, 7_7, 4_0, 2_7, 3_9, 3_1, 7_7, 3_5, 4_5, 7_7,
						        1_5, 5_2, 5_1, 3_9, 2_7, 4_0, 3_0, 3_5, 2_7, 4_5, 6_4, 7_7,
						        1_1, 3_5, 4_0, 3_3, 7_7, 4_1, 3_2, 7_7, 1_1, 3_5, 4_0, 3_3,
						        4_5, 6_6, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 1_2,
						        4_1, 4_1, 3_7, 7_7, 4_1, 4_0, 7_7, 3_9, 5_1, 7_7, 2_3, 4_1,
						        4_4, 3_7, 4_5, 6_4, 7_7, 5_1, 3_1, 7_7, 1_3, 3_5, 3_3, 3_4,
						        4_6, 5_1, 6_4, 7_7, 2_7, 4_0, 3_0, 7_7, 3_0, 3_1, 4_5, 4_2,
						        2_7, 3_5, 4_4, 6_7, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7,
						        7_7, 1_4, 4_1, 4_6, 3_4, 3_5, 4_0, 3_3, 7_7, 2_8, 3_1, 4_5,
						        3_5, 3_0, 3_1, 7_7, 4_4, 3_1, 3_9, 2_7, 3_5, 4_0, 4_5, 6_3,
						        7_7, 1_8, 4_1, 4_7, 4_0, 3_0, 7_7, 4_6, 3_4, 3_1, 7_7, 3_0,
						        3_1, 2_9, 2_7, 5_1, 7_9, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7, 7_7,
						        7_7, 1_5, 3_2, 7_7, 4_6, 3_4, 2_7, 4_6, 7_7, 2_9, 4_1, 3_8,
						        4_1, 4_5, 4_5, 2_7, 3_8, 7_7, 2_3, 4_4, 3_1, 2_9, 3_7, 6_4,
						        7_7, 2_8, 4_1, 4_7, 4_0, 3_0, 3_8, 3_1, 4_5, 4_5, 7_7, 2_7,
						        4_0, 3_0, 7_7, 2_8, 2_7, 4_4, 3_1, 7_9, 7_7, 7_7, 7_7, 7_7,
						        7_7, 7_7, 7_7, 7_7, 2_0, 3_4, 3_1, 7_7, 3_8, 4_1, 4_0, 3_1,
						        7_7, 2_7, 4_0, 3_0, 7_7, 3_8, 3_1, 4_8, 3_1, 3_8, 7_7, 4_5,
						        2_7, 4_0, 3_0, 4_5, 7_7, 4_5, 4_6, 4_4, 3_1, 4_6, 2_9, 3_4,
						        7_7, 3_2, 2_7, 4_4, 7_7, 2_7, 4_9, 2_7, 5_1, 7_9, 7_7, 7_7,
						        7_7, 7_7, 7_7, 7_7, 7_7, 7_7]]		),
						    torch.tensor([[0, 0, 0, 1_0_6_9, 1_1, -1, -1, -1, -1]]		),
						    torch.tensor([[0, 0, 0, 1_0_6_9, 1_1, -1, -1, -1, -1]]		),
						]
						# fmt: on
						self.assertTrue(torch.allclose(tokens[0]						,EXPECTED_OUTPUT[0]		)		)
						self.assertTrue(torch.allclose(tokens[1]						,EXPECTED_OUTPUT[1]		)		)
						self.assertTrue(torch.allclose(tokens[2]						,EXPECTED_OUTPUT[2]		)		)





