





import cmath
import math


def 							SCREAMING_SNAKE_CASE__						(    __a   , __a   , __a   , __a   ):
	snake_case_		:			Union[str, Any]											=	math.radians(__a   )
	snake_case_		:			Dict											=	math.radians(__a   )

	# Convert voltage and current to rectangular form
	snake_case_		:			Tuple											=	cmath.rect(__a   , __a   )
	snake_case_		:			Tuple											=	cmath.rect(__a   , __a   )

	# Calculate apparent power
	return voltage_rect * current_rect


if __name__ == "__main__":
						import doctest

						doctest.testmod()








import os
import pickle
import unittest

from transformers import AutoTokenizer
from transformers.models.bert.tokenization_bert import BertTokenizer
from transformers.models.bert_japanese.tokenization_bert_japanese import (
    VOCAB_FILES_NAMES,
    BertJapaneseTokenizer,
    CharacterTokenizer,
    JumanppTokenizer,
    MecabTokenizer,
    SudachiTokenizer,
    WordpieceTokenizer,
)
from transformers.testing_utils import custom_tokenizers, require_jumanpp, require_sudachi

from ...test_tokenization_common import TokenizerTesterMixin
@custom_tokenizers
class SCREAMING_SNAKE_CASE_						(					snake_case_       ,				unittest.TestCase					):
						__magic_name__:			Optional[Any]       =       BertJapaneseTokenizer
						__magic_name__:			Optional[int]       =       False
						__magic_name__:			Optional[int]       =       True






						def UpperCAmelCase_				(      self      :      Any	)							->    List[Any]:







							"""simple docstring"""


							super().setUp()

							snake_case_		:			int											=	[
							    '[UNK]',
							    '[CLS]',
							    '[SEP]',
							    'こんにちは',
							    'こん',
							    'にちは',
							    'ばんは',
							    '##こん',
							    '##にちは',
							    '##ばんは',
							    '世界',
							    '##世界',
							    '、',
							    '##、',
							    '。',
							    '##。',
							]

							snake_case_		:			List[Any]											=	os.path.join(self.tmpdirname		,   VOCAB_FILES_NAMES['vocab_file']	)
							with open(self.vocab_file		,   'w'		,   encoding='utf-8'	) as vocab_writer:
								vocab_writer.write(''.join([x + '\n' for x in vocab_tokens]	)	)






						def UpperCAmelCase_				(      self      :      int		,   _A      :      Union[str, Any]	)							->    Optional[int]:







							"""simple docstring"""


							snake_case_		:			List[Any]											=	'こんにちは、世界。 \nこんばんは、世界。'
							snake_case_		:			Optional[int]											=	'こんにちは 、 世界 。 こんばんは 、 世界 。'
							return input_text, output_text






						def UpperCAmelCase_				(      self      :      Any		,   _A      :      List[Any]	)							->    int:







							"""simple docstring"""


							snake_case_						,snake_case_		:			Optional[Any]											=	self.get_input_output_texts(_A	)
							snake_case_		:			Any											=	tokenizer.encode(_A		,   add_special_tokens=_A	)
							snake_case_		:			Union[str, Any]											=	tokenizer.decode(_A		,   clean_up_tokenization_spaces=_A	)
							return text, ids






						def UpperCAmelCase_				(      self      :      List[str]	)							->    str:







							"""simple docstring"""


							pass  # TODO add if relevant






						def UpperCAmelCase_				(      self      :      Dict	)							->    List[Any]:







							"""simple docstring"""


							pass  # TODO add if relevant






						def UpperCAmelCase_				(      self      :      str	)							->    Optional[int]:







							"""simple docstring"""


							pass  # TODO add if relevant






						def UpperCAmelCase_				(      self      :      Tuple	)							->    List[Any]:







							"""simple docstring"""


							snake_case_		:			List[str]											=	self.tokenizer_class(self.vocab_file	)

							snake_case_		:			int											=	tokenizer.tokenize('こんにちは、世界。\nこんばんは、世界。'	)
							self.assertListEqual(_A		,   ['こんにちは', '、', '世界', '。', 'こん', '##ばんは', '、', '世界', '。']	)
							self.assertListEqual(tokenizer.convert_tokens_to_ids(_A	)		,   [3, 12, 10, 14, 4, 9, 12, 10, 14]	)






						def UpperCAmelCase_				(      self      :      Optional[int]	)							->    Optional[int]:







							"""simple docstring"""


							snake_case_		:			int											=	self.tokenizer_class(self.vocab_file		,   word_tokenizer_type='mecab'	)
							self.assertIsNotNone(_A	)

							snake_case_		:			str											=	'こんにちは、世界。\nこんばんは、世界。'
							snake_case_		:			Optional[Any]											=	tokenizer.tokenize(_A	)
							self.assertListEqual(_A		,   ['こんにちは', '、', '世界', '。', 'こん', '##ばんは', '、', '世界', '。']	)
							self.assertListEqual(tokenizer.convert_tokens_to_ids(_A	)		,   [3, 12, 10, 14, 4, 9, 12, 10, 14]	)

							snake_case_		:			Optional[Any]											=	os.path.join(self.tmpdirname		,   'tokenizer.bin'	)
							with open(_A		,   'wb'	) as handle:
								pickle.dump(_A		,   _A	)

							with open(_A		,   'rb'	) as handle:
								snake_case_		:			Any											=	pickle.load(_A	)

							snake_case_		:			Optional[Any]											=	tokenizer_new.tokenize(_A	)

							self.assertListEqual(_A		,   _A	)






						def UpperCAmelCase_				(      self      :      Tuple	)							->    int:







							"""simple docstring"""


							snake_case_		:			str											=	MecabTokenizer(mecab_dic='ipadic'	)

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   ['アップルストア', 'で', 'iPhone', '8', 'が', '発売', 'さ', 'れ', 'た', '。']		,   )






						def UpperCAmelCase_				(      self      :      Tuple	)							->    Optional[Any]:







							"""simple docstring"""


							try:
								snake_case_		:			Dict											=	MecabTokenizer(mecab_dic='unidic_lite'	)
							except ModuleNotFoundError:
								return

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   ['アップル', 'ストア', 'で', 'iPhone', '8', 'が', '発売', 'さ', 'れ', 'た', '。']		,   )






						def UpperCAmelCase_				(      self      :      Optional[Any]	)							->    Tuple:







							"""simple docstring"""


							try:
								snake_case_		:			Any											=	MecabTokenizer(mecab_dic='unidic'	)
							except ModuleNotFoundError:
								return

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   ['アップル', 'ストア', 'で', 'iPhone', '8', 'が', '発売', 'さ', 'れ', 'た', '。']		,   )






						def UpperCAmelCase_				(      self      :      Any	)							->    Optional[int]:







							"""simple docstring"""


							snake_case_		:			Tuple											=	MecabTokenizer(do_lower_case=_A		,   mecab_dic='ipadic'	)

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   ['アップルストア', 'で', 'iphone', '8', 'が', '発売', 'さ', 'れ', 'た', '。']		,   )






						def UpperCAmelCase_				(      self      :      Optional[int]	)							->    int:







							"""simple docstring"""


							try:
								snake_case_		:			Union[str, Any]											=	MecabTokenizer(
								    do_lower_case=_A		,   normalize_text=_A		,   mecab_option='-d /usr/local/lib/mecab/dic/jumandic'	)
							except RuntimeError:
								# if dict doesn't exist in the system, previous code raises this error.
								return

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   ['ｱｯﾌﾟﾙストア', 'で', 'iPhone', '８', 'が', '発売', 'さ', 'れた', '\u3000', '。']		,   )






						def UpperCAmelCase_				(      self      :      Optional[Any]	)							->    List[Any]:







							"""simple docstring"""


							snake_case_		:			Union[str, Any]											=	MecabTokenizer(normalize_text=_A		,   mecab_dic='ipadic'	)

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   ['ｱｯﾌﾟﾙストア', 'で', 'iPhone', '８', 'が', '発売', 'さ', 'れ', 'た', '　', '。']		,   )






						@require_sudachi
						def UpperCAmelCase_				(      self      :      Union[str, Any]	)							->    int:







							"""simple docstring"""


							snake_case_		:			Optional[Any]											=	self.tokenizer_class(self.vocab_file		,   word_tokenizer_type='sudachi'	)
							self.assertIsNotNone(_A	)

							snake_case_		:			Optional[Any]											=	'こんにちは、世界。\nこんばんは、世界。'
							snake_case_		:			Optional[int]											=	tokenizer.tokenize(_A	)
							self.assertListEqual(_A		,   ['こんにちは', '、', '世界', '。', 'こん', '##ばんは', '、', '世界', '。']	)
							self.assertListEqual(tokenizer.convert_tokens_to_ids(_A	)		,   [3, 12, 10, 14, 4, 9, 12, 10, 14]	)

							snake_case_		:			Optional[int]											=	os.path.join(self.tmpdirname		,   'tokenizer.bin'	)
							with open(_A		,   'wb'	) as handle:
								pickle.dump(_A		,   _A	)

							with open(_A		,   'rb'	) as handle:
								snake_case_		:			Dict											=	pickle.load(_A	)

							snake_case_		:			Any											=	tokenizer_new.tokenize(_A	)

							self.assertListEqual(_A		,   _A	)






						@require_sudachi
						def UpperCAmelCase_				(      self      :      str	)							->    Optional[Any]:







							"""simple docstring"""


							snake_case_		:			Optional[Any]											=	SudachiTokenizer(sudachi_dict_type='core'	)

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   [' ', '\t', 'アップル', 'ストア', 'で', 'iPhone', '8', ' ', 'が', ' ', ' ', '\n ', '発売', 'さ', 'れ', 'た', ' ', '。', ' ', ' ']		,   )






						@require_sudachi
						def UpperCAmelCase_				(      self      :      Optional[int]	)							->    Optional[Any]:







							"""simple docstring"""


							snake_case_		:			str											=	SudachiTokenizer(sudachi_dict_type='core'		,   sudachi_split_mode='A'	)

							self.assertListEqual(tokenizer.tokenize('外国人参政権'	)		,   ['外国', '人', '参政', '権']	)






						@require_sudachi
						def UpperCAmelCase_				(      self      :      Tuple	)							->    int:







							"""simple docstring"""


							snake_case_		:			List[str]											=	SudachiTokenizer(sudachi_dict_type='core'		,   sudachi_split_mode='B'	)

							self.assertListEqual(tokenizer.tokenize('外国人参政権'	)		,   ['外国人', '参政権']	)






						@require_sudachi
						def UpperCAmelCase_				(      self      :      Any	)							->    int:







							"""simple docstring"""


							snake_case_		:			List[str]											=	SudachiTokenizer(sudachi_dict_type='core'		,   sudachi_split_mode='C'	)

							self.assertListEqual(tokenizer.tokenize('外国人参政権'	)		,   ['外国人参政権']	)






						@require_sudachi
						def UpperCAmelCase_				(      self      :      Union[str, Any]	)							->    int:







							"""simple docstring"""


							snake_case_		:			Any											=	SudachiTokenizer(do_lower_case=_A		,   sudachi_dict_type='core'	)

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   [' ', '\t', 'アップル', 'ストア', 'で', 'iphone', '8', ' ', 'が', ' ', ' ', '\n ', '発売', 'さ', 'れ', 'た', ' ', '。', ' ', ' ']		,   )






						@require_sudachi
						def UpperCAmelCase_				(      self      :      Any	)							->    List[str]:







							"""simple docstring"""


							snake_case_		:			Optional[int]											=	SudachiTokenizer(normalize_text=_A		,   sudachi_dict_type='core'	)

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   [' ', '\t', 'ｱｯﾌﾟﾙ', 'ストア', 'で', 'iPhone', '８', ' ', 'が', ' ', ' ', '\n ', '発売', 'さ', 'れ', 'た', '\u3000', '。', ' ', ' ']		,   )






						@require_sudachi
						def UpperCAmelCase_				(      self      :      List[Any]	)							->    Dict:







							"""simple docstring"""


							snake_case_		:			List[str]											=	SudachiTokenizer(trim_whitespace=_A		,   sudachi_dict_type='core'	)

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   ['アップル', 'ストア', 'で', 'iPhone', '8', 'が', '発売', 'さ', 'れ', 'た', '。']		,   )






						@require_jumanpp
						def UpperCAmelCase_				(      self      :      List[str]	)							->    Any:







							"""simple docstring"""


							snake_case_		:			Tuple											=	self.tokenizer_class(self.vocab_file		,   word_tokenizer_type='jumanpp'	)
							self.assertIsNotNone(_A	)

							snake_case_		:			Any											=	'こんにちは、世界。\nこんばんは、世界。'
							snake_case_		:			Any											=	tokenizer.tokenize(_A	)
							self.assertListEqual(_A		,   ['こんにちは', '、', '世界', '。', 'こん', '##ばんは', '、', '世界', '。']	)
							self.assertListEqual(tokenizer.convert_tokens_to_ids(_A	)		,   [3, 12, 10, 14, 4, 9, 12, 10, 14]	)

							snake_case_		:			Any											=	os.path.join(self.tmpdirname		,   'tokenizer.bin'	)
							with open(_A		,   'wb'	) as handle:
								pickle.dump(_A		,   _A	)

							with open(_A		,   'rb'	) as handle:
								snake_case_		:			Optional[Any]											=	pickle.load(_A	)

							snake_case_		:			Union[str, Any]											=	tokenizer_new.tokenize(_A	)

							self.assertListEqual(_A		,   _A	)






						@require_jumanpp
						def UpperCAmelCase_				(      self      :      Optional[int]	)							->    int:







							"""simple docstring"""


							snake_case_		:			Union[str, Any]											=	JumanppTokenizer()

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   ['アップル', 'ストア', 'で', 'iPhone', '8', '\u3000', 'が', '\u3000', '\u3000', '\u3000', '発売', 'さ', 'れた', '\u3000', '。']		,   )






						@require_jumanpp
						def UpperCAmelCase_				(      self      :      str	)							->    List[str]:







							"""simple docstring"""


							snake_case_		:			Dict											=	JumanppTokenizer(do_lower_case=_A	)

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   ['アップル', 'ストア', 'で', 'iphone', '8', '\u3000', 'が', '\u3000', '\u3000', '\u3000', '発売', 'さ', 'れた', '\u3000', '。']		,   )






						@require_jumanpp
						def UpperCAmelCase_				(      self      :      Tuple	)							->    Union[str, Any]:







							"""simple docstring"""


							snake_case_		:			str											=	JumanppTokenizer(normalize_text=_A	)

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   ['ｱ', 'ｯ', 'ﾌ', 'ﾟ', 'ﾙ', 'ストア', 'で', 'iPhone', '８', '\u3000', 'が', '\u3000', '\u3000', '\u3000', '発売', 'さ', 'れた', '\u3000', '。']		,   )






						@require_jumanpp
						def UpperCAmelCase_				(      self      :      Optional[Any]	)							->    Union[str, Any]:







							"""simple docstring"""


							snake_case_		:			Optional[int]											=	JumanppTokenizer(trim_whitespace=_A	)

							self.assertListEqual(
							    tokenizer.tokenize(' \tｱｯﾌﾟﾙストアでiPhone８ が  \n 発売された　。  '	)		,   ['アップル', 'ストア', 'で', 'iPhone', '8', 'が', '発売', 'さ', 'れた', '。']		,   )






						@require_jumanpp
						def UpperCAmelCase_				(      self      :      Any	)							->    Any:







							"""simple docstring"""


							snake_case_		:			List[Any]											=	JumanppTokenizer()

							self.assertListEqual(
							    tokenizer.tokenize('ありがとうございますm(_ _)ｍ見つけるのが大変です。'	)		,   ['ありがとう', 'ございます', 'm(_ _)m', '見つける', 'の', 'が', '大変です', '。']		,   )






						def UpperCAmelCase_				(      self      :      int	)							->    Any:







							"""simple docstring"""


							snake_case_		:			List[Any]											=	['[UNK]', '[CLS]', '[SEP]', 'こんにちは', 'こん', 'にちは', 'ばんは', '##こん', '##にちは', '##ばんは']

							snake_case_		:			List[Any]											=	{}
							for i, token in enumerate(_A	):
								snake_case_		:			List[str]											=	i
							snake_case_		:			List[str]											=	WordpieceTokenizer(vocab=_A		,   unk_token='[UNK]'	)

							self.assertListEqual(tokenizer.tokenize(''	)		,   []	)

							self.assertListEqual(tokenizer.tokenize('こんにちは'	)		,   ['こんにちは']	)

							self.assertListEqual(tokenizer.tokenize('こんばんは'	)		,   ['こん', '##ばんは']	)

							self.assertListEqual(tokenizer.tokenize('こんばんは こんばんにちは こんにちは'	)		,   ['こん', '##ばんは', '[UNK]', 'こんにちは']	)






						def UpperCAmelCase_				(      self      :      Optional[int]	)							->    Optional[int]:







							"""simple docstring"""


							snake_case_		:			Any											=	BertJapaneseTokenizer.from_pretrained('nlp-waseda/roberta-base-japanese-with-auto-jumanpp'	)
							snake_case_		:			Optional[int]											=	tokenizer.subword_tokenizer

							snake_case_		:			List[str]											=	subword_tokenizer.tokenize('国境 の 長い トンネル を 抜ける と 雪国 であった 。'	)
							self.assertListEqual(_A		,   ['▁国境', '▁の', '▁長い', '▁トンネル', '▁を', '▁抜ける', '▁と', '▁雪', '国', '▁であった', '▁。']	)

							snake_case_		:			Dict											=	subword_tokenizer.tokenize('こんばんは こんばん にち は こんにちは'	)
							self.assertListEqual(_A		,   ['▁こん', 'ばん', 'は', '▁こん', 'ばん', '▁に', 'ち', '▁は', '▁こんにちは']	)






						def UpperCAmelCase_				(      self      :      Optional[Any]	)							->    Any:







							"""simple docstring"""


							snake_case_		:			Dict											=	self.tokenizer_class.from_pretrained('cl-tohoku/bert-base-japanese'	)

							snake_case_		:			Tuple											=	tokenizer.encode('ありがとう。'		,   add_special_tokens=_A	)
							snake_case_		:			Optional[Any]											=	tokenizer.encode('どういたしまして。'		,   add_special_tokens=_A	)

							snake_case_		:			Dict											=	tokenizer.build_inputs_with_special_tokens(_A	)
							snake_case_		:			Optional[Any]											=	tokenizer.build_inputs_with_special_tokens(_A		,   _A	)

							# 2 is for "[CLS]", 3 is for "[SEP]"
							assert encoded_sentence == [2] + text + [3]
							assert encoded_pair == [2] + text + [3] + text_a + [3]
@custom_tokenizers
class SCREAMING_SNAKE_CASE_						(					snake_case_       ,				unittest.TestCase					):
						__magic_name__:			List[Any]       =       BertJapaneseTokenizer
						__magic_name__:			int       =       False






						def UpperCAmelCase_				(      self      :      List[Any]	)							->    List[Any]:







							"""simple docstring"""


							super().setUp()

							snake_case_		:			Optional[int]											=	['[UNK]', '[CLS]', '[SEP]', 'こ', 'ん', 'に', 'ち', 'は', 'ば', '世', '界', '、', '。']

							snake_case_		:			List[str]											=	os.path.join(self.tmpdirname		,   VOCAB_FILES_NAMES['vocab_file']	)
							with open(self.vocab_file		,   'w'		,   encoding='utf-8'	) as vocab_writer:
								vocab_writer.write(''.join([x + '\n' for x in vocab_tokens]	)	)






						def UpperCAmelCase_				(      self      :      List[Any]		,   **_A      :      Dict	)							->    List[str]:







							"""simple docstring"""


							return BertJapaneseTokenizer.from_pretrained(self.tmpdirname		,   subword_tokenizer_type='character'		,   **_A	)






						def UpperCAmelCase_				(      self      :      Dict		,   _A      :      str	)							->    Optional[int]:







							"""simple docstring"""


							snake_case_		:			Tuple											=	'こんにちは、世界。 \nこんばんは、世界。'
							snake_case_		:			str											=	'こ ん に ち は 、 世 界 。 こ ん ば ん は 、 世 界 。'
							return input_text, output_text






						def UpperCAmelCase_				(      self      :      Optional[int]	)							->    int:







							"""simple docstring"""


							pass  # TODO add if relevant






						def UpperCAmelCase_				(      self      :      Optional[int]	)							->    str:







							"""simple docstring"""


							pass  # TODO add if relevant






						def UpperCAmelCase_				(      self      :      Tuple	)							->    str:







							"""simple docstring"""


							pass  # TODO add if relevant






						def UpperCAmelCase_				(      self      :      Optional[Any]	)							->    Dict:







							"""simple docstring"""


							snake_case_		:			Any											=	self.tokenizer_class(self.vocab_file		,   subword_tokenizer_type='character'	)

							snake_case_		:			int											=	tokenizer.tokenize('こんにちは、世界。 \nこんばんは、世界。'	)
							self.assertListEqual(
							    _A		,   ['こ', 'ん', 'に', 'ち', 'は', '、', '世', '界', '。', 'こ', 'ん', 'ば', 'ん', 'は', '、', '世', '界', '。']	)
							self.assertListEqual(
							    tokenizer.convert_tokens_to_ids(_A	)		,   [3, 4, 5, 6, 7, 11, 9, 10, 12, 3, 4, 8, 4, 7, 11, 9, 10, 12]	)






						def UpperCAmelCase_				(      self      :      Any	)							->    Union[str, Any]:







							"""simple docstring"""


							snake_case_		:			Dict											=	['[UNK]', '[CLS]', '[SEP]', 'こ', 'ん', 'に', 'ち', 'は', 'ば', '世', '界', '、', '。']

							snake_case_		:			Optional[Any]											=	{}
							for i, token in enumerate(_A	):
								snake_case_		:			str											=	i
							snake_case_		:			Tuple											=	CharacterTokenizer(vocab=_A		,   unk_token='[UNK]'	)

							self.assertListEqual(tokenizer.tokenize(''	)		,   []	)

							self.assertListEqual(tokenizer.tokenize('こんにちは'	)		,   ['こ', 'ん', 'に', 'ち', 'は']	)

							self.assertListEqual(tokenizer.tokenize('こんにちほ'	)		,   ['こ', 'ん', 'に', 'ち', '[UNK]']	)






						def UpperCAmelCase_				(      self      :      List[Any]	)							->    str:







							"""simple docstring"""


							snake_case_		:			str											=	self.tokenizer_class.from_pretrained('cl-tohoku/bert-base-japanese-char'	)

							snake_case_		:			Optional[Any]											=	tokenizer.encode('ありがとう。'		,   add_special_tokens=_A	)
							snake_case_		:			List[str]											=	tokenizer.encode('どういたしまして。'		,   add_special_tokens=_A	)

							snake_case_		:			List[Any]											=	tokenizer.build_inputs_with_special_tokens(_A	)
							snake_case_		:			Tuple											=	tokenizer.build_inputs_with_special_tokens(_A		,   _A	)

							# 2 is for "[CLS]", 3 is for "[SEP]"
							assert encoded_sentence == [2] + text + [3]
							assert encoded_pair == [2] + text + [3] + text_a + [3]
@custom_tokenizers
class SCREAMING_SNAKE_CASE_						(					unittest.TestCase					):






						def UpperCAmelCase_				(      self      :      str	)							->    Optional[int]:







							"""simple docstring"""


							snake_case_		:			Optional[Any]											=	'cl-tohoku/bert-base-japanese'
							snake_case_		:			List[Any]											=	AutoTokenizer.from_pretrained(_A	)
							self.assertIsInstance(_A		,   _A	)
class SCREAMING_SNAKE_CASE_						(					unittest.TestCase					):






						def UpperCAmelCase_				(      self      :      int	)							->    Union[str, Any]:







							"""simple docstring"""


							snake_case_		:			List[Any]											=	'cl-tohoku/bert-base-japanese'
							with self.assertLogs('transformers'		,   level='WARNING'	) as cm:
								BertTokenizer.from_pretrained(_A	)
								self.assertTrue(
								    cm.records[0].message.startswith(
								        'The tokenizer class you load from this checkpoint is not the same type as the class this function'
								        ' is called from.'	)	)
							snake_case_		:			int											=	'bert-base-cased'
							with self.assertLogs('transformers'		,   level='WARNING'	) as cm:
								BertJapaneseTokenizer.from_pretrained(_A	)
								self.assertTrue(
								    cm.records[0].message.startswith(
								        'The tokenizer class you load from this checkpoint is not the same type as the class this function'
								        ' is called from.'	)	)

