


import json
import pathlib
import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision, slow
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin, prepare_image_inputs


if is_torch_available():
   import torch

if is_vision_available():
   from PIL import Image

   from transformers import ConditionalDetrImageProcessor
class  SCREAMING_SNAKE_CASE__  (				unittest.TestCase			):
      def __init__(       self				:       List[Any]     ,							SCREAMING_SNAKE_CASE__				:       Dict     ,							SCREAMING_SNAKE_CASE__				:       Dict=7     ,							SCREAMING_SNAKE_CASE__				:       Optional[Any]=3     ,							SCREAMING_SNAKE_CASE__				:       Union[str, Any]=3_0     ,							SCREAMING_SNAKE_CASE__				:       List[str]=4_0_0     ,							SCREAMING_SNAKE_CASE__				:       List[Any]=True     ,							SCREAMING_SNAKE_CASE__				:       Any=None     ,							SCREAMING_SNAKE_CASE__				:       List[str]=True     ,							SCREAMING_SNAKE_CASE__				:       Dict=[0.5, 0.5, 0.5]     ,							SCREAMING_SNAKE_CASE__				:       Optional[Any]=[0.5, 0.5, 0.5]     ,							SCREAMING_SNAKE_CASE__				:       Dict=True     ,							SCREAMING_SNAKE_CASE__				:       str=1 / 2_5_5     ,							SCREAMING_SNAKE_CASE__				:       Optional[Any]=True     ,							)		->			Union[str, Any]:
             # by setting size["longest_edge"] > max_resolution we're effectively not testing this :p
             a_					:		int							=  size if size is not None else {"""shortest_edge""": 1_8, """longest_edge""": 1_3_3_3}
             a_					:		Optional[Any]							=  parent
             a_					:		Union[str, Any]							=  batch_size
             a_					:		Optional[Any]							=  num_channels
             a_					:		Optional[int]							=  min_resolution
             a_					:		str							=  max_resolution
             a_					:		str							=  do_resize
             a_					:		Optional[int]							=  size
             a_					:		str							=  do_normalize
             a_					:		Tuple							=  image_mean
             a_					:		List[Any]							=  image_std
             a_					:		Tuple							=  do_rescale
             a_					:		List[Any]							=  rescale_factor
             a_					:		Tuple							=  do_pad
      def        SCREAMING_SNAKE_CASE							(       self				:       Union[str, Any]     )		->			str:
             return {
                 "do_resize": self.do_resize,
                 "size": self.size,
                 "do_normalize": self.do_normalize,
                 "image_mean": self.image_mean,
                 "image_std": self.image_std,
                 "do_rescale": self.do_rescale,
                 "rescale_factor": self.rescale_factor,
                 "do_pad": self.do_pad,
             }

      def        SCREAMING_SNAKE_CASE							(       self				:       Union[str, Any]     ,							SCREAMING_SNAKE_CASE__				:       Optional[int]     ,							SCREAMING_SNAKE_CASE__				:       int=False     )		->			Tuple:
             if not batched:
                    a_					:		str							=  image_inputs[0]
                    if isinstance(lowerCamelCase__     ,							Image.Image     ):
                           a_					:		str							=  image.size
                    else:
                           a_					:		Union[str, Any]							=  image.shape[1], image.shape[2]
                    if w < h:
                           a_					:		Dict							=  int(self.size['shortest_edge'] * h / w     )
                           a_					:		Union[str, Any]							=  self.size["""shortest_edge"""]
                    elif w > h:
                           a_					:		Optional[Any]							=  self.size["""shortest_edge"""]
                           a_					:		List[Any]							=  int(self.size['shortest_edge'] * w / h     )
                    else:
                           a_					:		List[str]							=  self.size["""shortest_edge"""]
                           a_					:		Optional[int]							=  self.size["""shortest_edge"""]

             else:
                    a_					:		Tuple							=  []
                    for image in image_inputs:
                           a_					:		Tuple							=  self.get_expected_values([image]     )
                           expected_values.append((expected_height, expected_width)     )
                    a_					:		Union[str, Any]							=  max(lowerCamelCase__     ,							key=lambda SCREAMING_SNAKE_CASE__     : item[0]     )[0]
                    a_					:		int							=  max(lowerCamelCase__     ,							key=lambda SCREAMING_SNAKE_CASE__     : item[1]     )[1]

             return expected_height, expected_width
@require_torch
@require_vision
class  SCREAMING_SNAKE_CASE__  (				SCREAMING_SNAKE_CASE__						,    unittest.TestCase			):
      snake_case__				:     Union[str, Any]        =						ConditionalDetrImageProcessor if is_vision_available() else None
      def        SCREAMING_SNAKE_CASE							(       self				:       Optional[int]     )		->			Any:
             a_					:		Optional[int]							=  ConditionalDetrImageProcessingTester(self     )
      @property
      def        SCREAMING_SNAKE_CASE							(       self				:       str     )		->			Optional[int]:
             return self.image_processor_tester.prepare_image_processor_dict()
      def        SCREAMING_SNAKE_CASE							(       self				:       Union[str, Any]     )		->			str:
             a_					:		int							=  self.image_processing_class(**self.image_processor_dict     )
             self.assertTrue(hasattr(lowerCamelCase__     ,							'image_mean'     )     )
             self.assertTrue(hasattr(lowerCamelCase__     ,							'image_std'     )     )
             self.assertTrue(hasattr(lowerCamelCase__     ,							'do_normalize'     )     )
             self.assertTrue(hasattr(lowerCamelCase__     ,							'do_resize'     )     )
             self.assertTrue(hasattr(lowerCamelCase__     ,							'size'     )     )
      def        SCREAMING_SNAKE_CASE							(       self				:       Dict     )		->			Tuple:
             a_					:		Union[str, Any]							=  self.image_processing_class.from_dict(self.image_processor_dict     )
             self.assertEqual(image_processor.size     ,							{'shortest_edge': 1_8, 'longest_edge': 1_3_3_3}     )
             self.assertEqual(image_processor.do_pad     ,							lowerCamelCase__     )

             a_					:		Union[str, Any]							=  self.image_processing_class.from_dict(
                 self.image_processor_dict     ,							size=4_2     ,							max_size=8_4     ,							pad_and_return_pixel_mask=lowerCamelCase__     )
             self.assertEqual(image_processor.size     ,							{'shortest_edge': 4_2, 'longest_edge': 8_4}     )
             self.assertEqual(image_processor.do_pad     ,							lowerCamelCase__     )
      def        SCREAMING_SNAKE_CASE							(       self				:       Dict     )		->			Union[str, Any]:
             pass
      def        SCREAMING_SNAKE_CASE							(       self				:       Any     )		->			Any:
             # Initialize image_processing
             a_					:		Union[str, Any]							=  self.image_processing_class(**self.image_processor_dict     )
             # create random PIL images
             a_					:		str							=  prepare_image_inputs(self.image_processor_tester     ,							equal_resolution=lowerCamelCase__     )
             for image in image_inputs:
                    self.assertIsInstance(lowerCamelCase__     ,							Image.Image     )

             # Test not batched input
             a_					:		List[Any]							=  image_processing(image_inputs[0]     ,							return_tensors='pt'     ).pixel_values

             a_					:		Union[str, Any]							=  self.image_processor_tester.get_expected_values(lowerCamelCase__     )

             self.assertEqual(
                 encoded_images.shape     ,							(1, self.image_processor_tester.num_channels, expected_height, expected_width)     ,							)

             # Test batched
             a_					:		Tuple							=  self.image_processor_tester.get_expected_values(lowerCamelCase__     ,							batched=lowerCamelCase__     )

             a_					:		Any							=  image_processing(lowerCamelCase__     ,							return_tensors='pt'     ).pixel_values
             self.assertEqual(
                 encoded_images.shape     ,							(
                     self.image_processor_tester.batch_size,
                     self.image_processor_tester.num_channels,
                     expected_height,
                     expected_width,
                 )     ,							)
      def        SCREAMING_SNAKE_CASE							(       self				:       List[str]     )		->			List[str]:
             # Initialize image_processing
             a_					:		List[str]							=  self.image_processing_class(**self.image_processor_dict     )
             # create random numpy tensors
             a_					:		str							=  prepare_image_inputs(self.image_processor_tester     ,							equal_resolution=lowerCamelCase__     ,							numpify=lowerCamelCase__     )
             for image in image_inputs:
                    self.assertIsInstance(lowerCamelCase__     ,							np.ndarray     )

             # Test not batched input
             a_					:		Optional[int]							=  image_processing(image_inputs[0]     ,							return_tensors='pt'     ).pixel_values

             a_					:		Union[str, Any]							=  self.image_processor_tester.get_expected_values(lowerCamelCase__     )

             self.assertEqual(
                 encoded_images.shape     ,							(1, self.image_processor_tester.num_channels, expected_height, expected_width)     ,							)

             # Test batched
             a_					:		Optional[int]							=  image_processing(lowerCamelCase__     ,							return_tensors='pt'     ).pixel_values

             a_					:		int							=  self.image_processor_tester.get_expected_values(lowerCamelCase__     ,							batched=lowerCamelCase__     )

             self.assertEqual(
                 encoded_images.shape     ,							(
                     self.image_processor_tester.batch_size,
                     self.image_processor_tester.num_channels,
                     expected_height,
                     expected_width,
                 )     ,							)
      def        SCREAMING_SNAKE_CASE							(       self				:       int     )		->			Optional[Any]:
             # Initialize image_processing
             a_					:		List[Any]							=  self.image_processing_class(**self.image_processor_dict     )
             # create random PyTorch tensors
             a_					:		List[Any]							=  prepare_image_inputs(self.image_processor_tester     ,							equal_resolution=lowerCamelCase__     ,							torchify=lowerCamelCase__     )
             for image in image_inputs:
                    self.assertIsInstance(lowerCamelCase__     ,							torch.Tensor     )

             # Test not batched input
             a_					:		Optional[int]							=  image_processing(image_inputs[0]     ,							return_tensors='pt'     ).pixel_values

             a_					:		Optional[Any]							=  self.image_processor_tester.get_expected_values(lowerCamelCase__     )

             self.assertEqual(
                 encoded_images.shape     ,							(1, self.image_processor_tester.num_channels, expected_height, expected_width)     ,							)

             # Test batched
             a_					:		Union[str, Any]							=  image_processing(lowerCamelCase__     ,							return_tensors='pt'     ).pixel_values

             a_					:		Any							=  self.image_processor_tester.get_expected_values(lowerCamelCase__     ,							batched=lowerCamelCase__     )

             self.assertEqual(
                 encoded_images.shape     ,							(
                     self.image_processor_tester.batch_size,
                     self.image_processor_tester.num_channels,
                     expected_height,
                     expected_width,
                 )     ,							)
      @slow
      def        SCREAMING_SNAKE_CASE							(       self				:       Optional[int]     )		->			Dict:
             # prepare image and target
             a_					:		Tuple							=  Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png'     )
             with open('./tests/fixtures/tests_samples/COCO/coco_annotations.txt'     ,							'r'     ) as f:
                    a_					:		Tuple							=  json.loads(f.read()     )

             a_					:		Optional[int]							=  {"""image_id""": 3_9_7_6_9, """annotations""": target}

             # encode them
             a_					:		str							=  ConditionalDetrImageProcessor.from_pretrained('microsoft/conditional-detr-resnet-50'     )
             a_					:		int							=  image_processing(images=lowerCamelCase__     ,							annotations=lowerCamelCase__     ,							return_tensors='pt'     )

             # verify pixel values
             a_					:		int							=  torch.Size([1, 3, 8_0_0, 1_0_6_6]     )
             self.assertEqual(encoding['pixel_values'].shape     ,							lowerCamelCase__     )

             a_					:		Optional[Any]							=  torch.tensor([0.2796, 0.3138, 0.3481]     )
             self.assertTrue(torch.allclose(encoding['pixel_values'][0, 0, 0, :3]     ,							lowerCamelCase__     ,							atol=1E-4     )     )

             # verify area
             a_					:		str							=  torch.tensor([5887.9600, 1_1_2_5_0.2_0_6_1, 4_8_9_3_5_3.8_4_3_8, 8_3_7_1_2_2.7_5_0_0, 1_4_7_9_6_7.5_1_5_6, 1_6_5_7_3_2.3_4_3_8]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['area']     ,							lowerCamelCase__     )     )
             # verify boxes
             a_					:		Dict							=  torch.Size([6, 4]     )
             self.assertEqual(encoding['labels'][0]['boxes'].shape     ,							lowerCamelCase__     )
             a_					:		Any							=  torch.tensor([0.5503, 0.2765, 0.0604, 0.2215]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['boxes'][0]     ,							lowerCamelCase__     ,							atol=1E-3     )     )
             # verify image_id
             a_					:		str							=  torch.tensor([3_9_7_6_9]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['image_id']     ,							lowerCamelCase__     )     )
             # verify is_crowd
             a_					:		Tuple							=  torch.tensor([0, 0, 0, 0, 0, 0]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['iscrowd']     ,							lowerCamelCase__     )     )
             # verify class_labels
             a_					:		Optional[int]							=  torch.tensor([7_5, 7_5, 6_3, 6_5, 1_7, 1_7]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['class_labels']     ,							lowerCamelCase__     )     )
             # verify orig_size
             a_					:		str							=  torch.tensor([4_8_0, 6_4_0]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['orig_size']     ,							lowerCamelCase__     )     )
             # verify size
             a_					:		List[str]							=  torch.tensor([8_0_0, 1_0_6_6]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['size']     ,							lowerCamelCase__     )     )

      @slow
      def        SCREAMING_SNAKE_CASE							(       self				:       List[str]     )		->			Tuple:
             # prepare image, target and masks_path
             a_					:		List[str]							=  Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png'     )
             with open('./tests/fixtures/tests_samples/COCO/coco_panoptic_annotations.txt'     ,							'r'     ) as f:
                    a_					:		Any							=  json.loads(f.read()     )

             a_					:		List[Any]							=  {"""file_name""": """000000039769.png""", """image_id""": 3_9_7_6_9, """segments_info""": target}

             a_					:		List[Any]							=  pathlib.Path('./tests/fixtures/tests_samples/COCO/coco_panoptic'     )

             # encode them
             a_					:		Any							=  ConditionalDetrImageProcessor(format='coco_panoptic'     )
             a_					:		Tuple							=  image_processing(images=lowerCamelCase__     ,							annotations=lowerCamelCase__     ,							masks_path=lowerCamelCase__     ,							return_tensors='pt'     )

             # verify pixel values
             a_					:		Optional[Any]							=  torch.Size([1, 3, 8_0_0, 1_0_6_6]     )
             self.assertEqual(encoding['pixel_values'].shape     ,							lowerCamelCase__     )

             a_					:		Tuple							=  torch.tensor([0.2796, 0.3138, 0.3481]     )
             self.assertTrue(torch.allclose(encoding['pixel_values'][0, 0, 0, :3]     ,							lowerCamelCase__     ,							atol=1E-4     )     )

             # verify area
             a_					:		int							=  torch.tensor([1_4_7_9_7_9.6_8_7_5, 1_6_5_5_2_7.0_4_6_9, 4_8_4_6_3_8.5_9_3_8, 1_1_2_9_2.9_3_7_5, 5879.6562, 7634.1147]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['area']     ,							lowerCamelCase__     )     )
             # verify boxes
             a_					:		Optional[Any]							=  torch.Size([6, 4]     )
             self.assertEqual(encoding['labels'][0]['boxes'].shape     ,							lowerCamelCase__     )
             a_					:		Any							=  torch.tensor([0.2625, 0.5437, 0.4688, 0.8625]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['boxes'][0]     ,							lowerCamelCase__     ,							atol=1E-3     )     )
             # verify image_id
             a_					:		int							=  torch.tensor([3_9_7_6_9]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['image_id']     ,							lowerCamelCase__     )     )
             # verify is_crowd
             a_					:		str							=  torch.tensor([0, 0, 0, 0, 0, 0]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['iscrowd']     ,							lowerCamelCase__     )     )
             # verify class_labels
             a_					:		Optional[Any]							=  torch.tensor([1_7, 1_7, 6_3, 7_5, 7_5, 9_3]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['class_labels']     ,							lowerCamelCase__     )     )
             # verify masks
             a_					:		List[Any]							=  8_2_2_8_7_3
             self.assertEqual(encoding['labels'][0]['masks'].sum().item()     ,							lowerCamelCase__     )
             # verify orig_size
             a_					:		Union[str, Any]							=  torch.tensor([4_8_0, 6_4_0]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['orig_size']     ,							lowerCamelCase__     )     )
             # verify size
             a_					:		Union[str, Any]							=  torch.tensor([8_0_0, 1_0_6_6]     )
             self.assertTrue(torch.allclose(encoding['labels'][0]['size']     ,							lowerCamelCase__     )     )







import json
from typing import List, Optional, Tuple

from tokenizers import normalizers

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_funnel import FunnelTokenizer


SCREAMING_SNAKE_CASE_:Dict             =						logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_:int             =						{"""vocab_file""": """vocab.txt""", """tokenizer_file""": """tokenizer.json"""}

SCREAMING_SNAKE_CASE_:Optional[Any]             =						[
    """small""",
    """small-base""",
    """medium""",
    """medium-base""",
    """intermediate""",
    """intermediate-base""",
    """large""",
    """large-base""",
    """xlarge""",
    """xlarge-base""",
]

SCREAMING_SNAKE_CASE_:int             =						{
    """vocab_file""": {
        """funnel-transformer/small""": """https://huggingface.co/funnel-transformer/small/resolve/main/vocab.txt""",
        """funnel-transformer/small-base""": """https://huggingface.co/funnel-transformer/small-base/resolve/main/vocab.txt""",
        """funnel-transformer/medium""": """https://huggingface.co/funnel-transformer/medium/resolve/main/vocab.txt""",
        """funnel-transformer/medium-base""": (
            """https://huggingface.co/funnel-transformer/medium-base/resolve/main/vocab.txt"""
        ),
        """funnel-transformer/intermediate""": (
            """https://huggingface.co/funnel-transformer/intermediate/resolve/main/vocab.txt"""
        ),
        """funnel-transformer/intermediate-base""": (
            """https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/vocab.txt"""
        ),
        """funnel-transformer/large""": """https://huggingface.co/funnel-transformer/large/resolve/main/vocab.txt""",
        """funnel-transformer/large-base""": """https://huggingface.co/funnel-transformer/large-base/resolve/main/vocab.txt""",
        """funnel-transformer/xlarge""": """https://huggingface.co/funnel-transformer/xlarge/resolve/main/vocab.txt""",
        """funnel-transformer/xlarge-base""": (
            """https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/vocab.txt"""
        ),
    },
    """tokenizer_file""": {
        """funnel-transformer/small""": """https://huggingface.co/funnel-transformer/small/resolve/main/tokenizer.json""",
        """funnel-transformer/small-base""": (
            """https://huggingface.co/funnel-transformer/small-base/resolve/main/tokenizer.json"""
        ),
        """funnel-transformer/medium""": """https://huggingface.co/funnel-transformer/medium/resolve/main/tokenizer.json""",
        """funnel-transformer/medium-base""": (
            """https://huggingface.co/funnel-transformer/medium-base/resolve/main/tokenizer.json"""
        ),
        """funnel-transformer/intermediate""": (
            """https://huggingface.co/funnel-transformer/intermediate/resolve/main/tokenizer.json"""
        ),
        """funnel-transformer/intermediate-base""": (
            """https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/tokenizer.json"""
        ),
        """funnel-transformer/large""": """https://huggingface.co/funnel-transformer/large/resolve/main/tokenizer.json""",
        """funnel-transformer/large-base""": (
            """https://huggingface.co/funnel-transformer/large-base/resolve/main/tokenizer.json"""
        ),
        """funnel-transformer/xlarge""": """https://huggingface.co/funnel-transformer/xlarge/resolve/main/tokenizer.json""",
        """funnel-transformer/xlarge-base""": (
            """https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/tokenizer.json"""
        ),
    },
}
SCREAMING_SNAKE_CASE_:int             =						{F"""funnel-transformer/{name}""": 512 for name in _model_names}
SCREAMING_SNAKE_CASE_:Dict             =						{F"""funnel-transformer/{name}""": {"""do_lower_case""": True} for name in _model_names}






class SCREAMING_SNAKE_CASE__     (		SCREAMING_SNAKE_CASE__    ):




    '''simple docstring'''






    __lowerCamelCase			: List[str]					=      VOCAB_FILES_NAMES
    __lowerCamelCase			: Union[str, Any]					=      PRETRAINED_VOCAB_FILES_MAP
    __lowerCamelCase			: str					=      PRETRAINED_INIT_CONFIGURATION
    __lowerCamelCase			: Tuple					=      FunnelTokenizer
    __lowerCamelCase			: str					=      PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
    __lowerCamelCase			: int					=      2






    def __init__(       self,		lowerCamelCase__=None,		lowerCamelCase__=None,		lowerCamelCase__=True,		lowerCamelCase__="<unk>",		lowerCamelCase__="<sep>",		lowerCamelCase__="<pad>",		lowerCamelCase__="<cls>",		lowerCamelCase__="<mask>",		lowerCamelCase__="<s>",		lowerCamelCase__="</s>",		lowerCamelCase__=True,		lowerCamelCase__=True,		lowerCamelCase__=None,		lowerCamelCase__="##",		**lowerCamelCase__,		):
        super().__init__(
            lowerCamelCase__,		tokenizer_file=lowerCamelCase__,		do_lower_case=lowerCamelCase__,		unk_token=lowerCamelCase__,		sep_token=lowerCamelCase__,		pad_token=lowerCamelCase__,		cls_token=lowerCamelCase__,		mask_token=lowerCamelCase__,		bos_token=lowerCamelCase__,		eos_token=lowerCamelCase__,		clean_text=lowerCamelCase__,		tokenize_chinese_chars=lowerCamelCase__,		strip_accents=lowerCamelCase__,		wordpieces_prefix=lowerCamelCase__,		**lowerCamelCase__,		)

        A :       List[str]          =   json.loads(self.backend_tokenizer.normalizer.__getstate__()		)
        if (
            normalizer_state.get("""lowercase""",		lowerCamelCase__		) != do_lower_case
            or normalizer_state.get("""strip_accents""",		lowerCamelCase__		) != strip_accents
            or normalizer_state.get("""handle_chinese_chars""",		lowerCamelCase__		) != tokenize_chinese_chars
        ):
            A :       Optional[Any]          =   getattr(lowerCamelCase__,		normalizer_state.pop("""type"""		)		)
            A :       Union[str, Any]          =   do_lower_case
            A :       List[Any]          =   strip_accents
            A :       Optional[int]          =   tokenize_chinese_chars
            A :       Dict          =   normalizer_class(**lowerCamelCase__		)

        A :       List[Any]          =   do_lower_case






    def 			_lowerCAmelCase					(       self,		lowerCamelCase__,		lowerCamelCase__=None		):
        A :       Union[str, Any]          =   [self.cls_token_id] + token_ids_a + [self.sep_token_id]

        if token_ids_a:
            output += token_ids_a + [self.sep_token_id]

        return output






    def 			_lowerCAmelCase					(       self,		lowerCamelCase__,		lowerCamelCase__ = None		):
        A :       Any          =   [self.sep_token_id]
        A :       Any          =   [self.cls_token_id]
        if token_ids_a is None:
            return len(cls		) * [self.cls_token_type_id] + len(token_ids_a + sep		) * [0]
        return len(cls		) * [self.cls_token_type_id] + len(token_ids_a + sep		) * [0] + len(token_ids_a + sep		) * [1]






    def 			_lowerCAmelCase					(       self,		lowerCamelCase__,		lowerCamelCase__ = None		):
        A :       int          =   self._tokenizer.model.save(lowerCamelCase__,		name=lowerCamelCase__		)
        return tuple(lowerCamelCase__		)


