




import json
import os
import random
import shutil
import tempfile
import unittest

import numpy as np
import pytest

from transformers import BertTokenizer, BertTokenizerFast
from transformers.models.bert.tokenization_bert import VOCAB_FILES_NAMES
from transformers.testing_utils import require_vision
from transformers.utils import IMAGE_PROCESSOR_NAME, is_vision_available


if is_vision_available():
	from PIL import Image

	from transformers import FlavaImageProcessor, FlavaProcessor
	from transformers.models.flava.image_processing_flava import (
	    FLAVA_CODEBOOK_MEAN,
	    FLAVA_CODEBOOK_STD,
	    FLAVA_IMAGE_MEAN,
	    FLAVA_IMAGE_STD,
	)
@require_vision
class 				__snake_case     (unittest.TestCase						):



				def 					SCREAMING_SNAKE_CASE				(					self					:						str					)     ->			str:





								'''simple docstring'''




								_lowerCAmelCase			:			List[str]        =					tempfile.mkdtemp()

								# fmt: off
								_lowerCAmelCase			:			Optional[int]        =					["""[UNK]""", """[CLS]""", """[SEP]""", """[PAD]""", """[MASK]""", """want""", """##want""", """##ed""", """wa""", """un""", """runn""", """##ing""", """,""", """low""", """lowest"""]
								# fmt: on
								_lowerCAmelCase			:			Any        =					os.path.join(self.tmpdirname						,		VOCAB_FILES_NAMES["""vocab_file"""]					)

								with open(self.vocab_file						,		"""w"""						,		encoding="""utf-8"""					) as fp:
												fp.write("""""".join([x + """\n""" for x in vocab_tokens]					)					)

								_lowerCAmelCase			:			Union[str, Any]        =					{
								    """image_mean""": FLAVA_IMAGE_MEAN,
								    """image_std""": FLAVA_IMAGE_STD,
								    """do_normalize""": True,
								    """do_resize""": True,
								    """size""": 224,
								    """do_center_crop""": True,
								    """crop_size""": 224,
								    """input_size_patches""": 14,
								    """total_mask_patches""": 75,
								    """mask_group_max_patches""": None,
								    """mask_group_min_patches""": 16,
								    """mask_group_min_aspect_ratio""": 0.3,
								    """mask_group_max_aspect_ratio""": None,
								    """codebook_do_resize""": True,
								    """codebook_size""": 112,
								    """codebook_do_center_crop""": True,
								    """codebook_crop_size""": 112,
								    """codebook_do_map_pixels""": True,
								    """codebook_do_normalize""": True,
								    """codebook_image_mean""": FLAVA_CODEBOOK_MEAN,
								    """codebook_image_std""": FLAVA_CODEBOOK_STD,
								}

								_lowerCAmelCase			:			Dict        =					os.path.join(self.tmpdirname						,		_UpperCAmelCase					)
								with open(self.image_processor_file						,		"""w"""						,		encoding="""utf-8"""					) as fp:
												json.dump(_UpperCAmelCase						,		_UpperCAmelCase					)



				def 					SCREAMING_SNAKE_CASE				(					self					:						Optional[int]						,		**_UpperCAmelCase					:						Any					)     ->			Any:





								'''simple docstring'''




								return BertTokenizer.from_pretrained(self.tmpdirname						,		**_UpperCAmelCase					)



				def 					SCREAMING_SNAKE_CASE				(					self					:						List[Any]						,		**_UpperCAmelCase					:						List[str]					)     ->			Union[str, Any]:





								'''simple docstring'''




								return BertTokenizerFast.from_pretrained(self.tmpdirname						,		**_UpperCAmelCase					)



				def 					SCREAMING_SNAKE_CASE				(					self					:						Optional[int]						,		**_UpperCAmelCase					:						Union[str, Any]					)     ->			Any:





								'''simple docstring'''




								return FlavaImageProcessor.from_pretrained(self.tmpdirname						,		**_UpperCAmelCase					)



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





								'''simple docstring'''




								shutil.rmtree(self.tmpdirname					)



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





								'''simple docstring'''




								_lowerCAmelCase			:			int        =					[np.random.randint(255						,		size=(3, 30, 400)						,		dtype=np.uinta					)]

								_lowerCAmelCase			:			List[str]        =					[Image.fromarray(np.moveaxis(_UpperCAmelCase						,		0						,		-1					)					) for x in image_inputs]

								return image_inputs



				def 					SCREAMING_SNAKE_CASE				(					self					:						int					)     ->			Tuple:





								'''simple docstring'''




								_lowerCAmelCase			:			Optional[int]        =					self.get_tokenizer()
								_lowerCAmelCase			:			List[str]        =					self.get_rust_tokenizer()
								_lowerCAmelCase			:			Any        =					self.get_image_processor()

								_lowerCAmelCase			:			List[str]        =					FlavaProcessor(tokenizer=_UpperCAmelCase						,		image_processor=_UpperCAmelCase					)
								processor_slow.save_pretrained(self.tmpdirname					)
								_lowerCAmelCase			:			int        =					FlavaProcessor.from_pretrained(self.tmpdirname						,		use_fast=_UpperCAmelCase					)

								_lowerCAmelCase			:			Any        =					FlavaProcessor(tokenizer=_UpperCAmelCase						,		image_processor=_UpperCAmelCase					)
								processor_fast.save_pretrained(self.tmpdirname					)
								_lowerCAmelCase			:			Any        =					FlavaProcessor.from_pretrained(self.tmpdirname					)

								self.assertEqual(processor_slow.tokenizer.get_vocab()						,		tokenizer_slow.get_vocab()					)
								self.assertEqual(processor_fast.tokenizer.get_vocab()						,		tokenizer_fast.get_vocab()					)
								self.assertEqual(tokenizer_slow.get_vocab()						,		tokenizer_fast.get_vocab()					)
								self.assertIsInstance(processor_slow.tokenizer						,		_UpperCAmelCase					)
								self.assertIsInstance(processor_fast.tokenizer						,		_UpperCAmelCase					)

								self.assertEqual(processor_slow.image_processor.to_json_string()						,		image_processor.to_json_string()					)
								self.assertEqual(processor_fast.image_processor.to_json_string()						,		image_processor.to_json_string()					)
								self.assertIsInstance(processor_slow.image_processor						,		_UpperCAmelCase					)
								self.assertIsInstance(processor_fast.image_processor						,		_UpperCAmelCase					)



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





								'''simple docstring'''




								_lowerCAmelCase			:			int        =					FlavaProcessor(tokenizer=self.get_tokenizer()						,		image_processor=self.get_image_processor()					)
								processor.save_pretrained(self.tmpdirname					)

								_lowerCAmelCase			:			Optional[Any]        =					self.get_tokenizer(bos_token="""(BOS)"""						,		eos_token="""(EOS)"""					)
								_lowerCAmelCase			:			Any        =					self.get_image_processor(do_normalize=_UpperCAmelCase						,		padding_value=1.0					)

								_lowerCAmelCase			:			Union[str, Any]        =					FlavaProcessor.from_pretrained(
								    self.tmpdirname						,		bos_token="""(BOS)"""						,		eos_token="""(EOS)"""						,		do_normalize=_UpperCAmelCase						,		padding_value=1.0					)

								self.assertEqual(processor.tokenizer.get_vocab()						,		tokenizer_add_kwargs.get_vocab()					)
								self.assertIsInstance(processor.tokenizer						,		_UpperCAmelCase					)

								self.assertEqual(processor.image_processor.to_json_string()						,		image_processor_add_kwargs.to_json_string()					)
								self.assertIsInstance(processor.image_processor						,		_UpperCAmelCase					)



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





								'''simple docstring'''




								_lowerCAmelCase			:			int        =					self.get_image_processor()
								_lowerCAmelCase			:			Optional[int]        =					self.get_tokenizer()

								_lowerCAmelCase			:			Optional[Any]        =					FlavaProcessor(tokenizer=_UpperCAmelCase						,		image_processor=_UpperCAmelCase					)

								_lowerCAmelCase			:			Dict        =					self.prepare_image_inputs()

								_lowerCAmelCase			:			Optional[int]        =					image_processor(_UpperCAmelCase						,		return_tensors="""np"""					)
								_lowerCAmelCase			:			List[Any]        =					processor(images=_UpperCAmelCase						,		return_tensors="""np"""					)

								for key in input_feat_extract.keys():
												self.assertAlmostEqual(input_feat_extract[key].sum()						,		input_processor[key].sum()						,		delta=1E-2					)

								# With rest of the args
								random.seed(1234					)
								_lowerCAmelCase			:			Optional[int]        =					image_processor(
								    _UpperCAmelCase						,		return_image_mask=_UpperCAmelCase						,		return_codebook_pixels=_UpperCAmelCase						,		return_tensors="""np"""					)
								random.seed(1234					)
								_lowerCAmelCase			:			Any        =					processor(
								    images=_UpperCAmelCase						,		return_image_mask=_UpperCAmelCase						,		return_codebook_pixels=_UpperCAmelCase						,		return_tensors="""np"""					)

								for key in input_feat_extract.keys():
												self.assertAlmostEqual(input_feat_extract[key].sum()						,		input_processor[key].sum()						,		delta=1E-2					)



				def 					SCREAMING_SNAKE_CASE				(					self					:						Tuple					)     ->			int:





								'''simple docstring'''




								_lowerCAmelCase			:			Optional[Any]        =					self.get_image_processor()
								_lowerCAmelCase			:			Optional[int]        =					self.get_tokenizer()

								_lowerCAmelCase			:			Optional[int]        =					FlavaProcessor(tokenizer=_UpperCAmelCase						,		image_processor=_UpperCAmelCase					)

								_lowerCAmelCase			:			Optional[int]        =					"""lower newer"""

								_lowerCAmelCase			:			List[str]        =					processor(text=_UpperCAmelCase					)

								_lowerCAmelCase			:			Tuple        =					tokenizer(_UpperCAmelCase					)

								for key in encoded_tok.keys():
												self.assertListEqual(encoded_tok[key]						,		encoded_processor[key]					)



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





								'''simple docstring'''




								_lowerCAmelCase			:			Optional[int]        =					self.get_image_processor()
								_lowerCAmelCase			:			str        =					self.get_tokenizer()

								_lowerCAmelCase			:			Dict        =					FlavaProcessor(tokenizer=_UpperCAmelCase						,		image_processor=_UpperCAmelCase					)

								_lowerCAmelCase			:			Dict        =					"""lower newer"""
								_lowerCAmelCase			:			Dict        =					self.prepare_image_inputs()

								_lowerCAmelCase			:			Dict        =					processor(text=_UpperCAmelCase						,		images=_UpperCAmelCase					)

								self.assertListEqual(list(inputs.keys()					)						,		["""input_ids""", """token_type_ids""", """attention_mask""", """pixel_values"""]					)

								# add extra args
								_lowerCAmelCase			:			List[Any]        =					processor(text=_UpperCAmelCase						,		images=_UpperCAmelCase						,		return_codebook_pixels=_UpperCAmelCase						,		return_image_mask=_UpperCAmelCase					)

								self.assertListEqual(
								    list(inputs.keys()					)						,		[
								        """input_ids""",
								        """token_type_ids""",
								        """attention_mask""",
								        """pixel_values""",
								        """codebook_pixel_values""",
								        """bool_masked_pos""",
								    ]						,		)

								# test if it raises when no input is passed
								with pytest.raises(_UpperCAmelCase					):
												processor()



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





								'''simple docstring'''




								_lowerCAmelCase			:			Optional[Any]        =					self.get_image_processor()
								_lowerCAmelCase			:			Optional[int]        =					self.get_tokenizer()

								_lowerCAmelCase			:			Optional[Any]        =					FlavaProcessor(tokenizer=_UpperCAmelCase						,		image_processor=_UpperCAmelCase					)

								_lowerCAmelCase			:			Optional[int]        =					[[1, 4, 5, 8, 1, 0, 8], [3, 4, 3, 1, 1, 8, 9]]

								_lowerCAmelCase			:			Any        =					processor.batch_decode(_UpperCAmelCase					)
								_lowerCAmelCase			:			Dict        =					tokenizer.batch_decode(_UpperCAmelCase					)

								self.assertListEqual(_UpperCAmelCase						,		_UpperCAmelCase					)



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





								'''simple docstring'''




								_lowerCAmelCase			:			int        =					self.get_image_processor()
								_lowerCAmelCase			:			Dict        =					self.get_tokenizer()

								_lowerCAmelCase			:			List[Any]        =					FlavaProcessor(tokenizer=_UpperCAmelCase						,		image_processor=_UpperCAmelCase					)

								_lowerCAmelCase			:			int        =					"""lower newer"""
								_lowerCAmelCase			:			Optional[Any]        =					self.prepare_image_inputs()

								_lowerCAmelCase			:			Optional[int]        =					processor(text=_UpperCAmelCase						,		images=_UpperCAmelCase					)

								self.assertListEqual(list(inputs.keys()					)						,		processor.model_input_names					)







import json
from typing import List, Optional, Tuple

from tokenizers import pre_tokenizers, processors

from ...tokenization_utils_base import AddedToken, BatchEncoding
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_longformer import LongformerTokenizer


_lowerCamelCase					:     Optional[Any]					  =  logging.get_logger(__name__)

_lowerCamelCase					:     Dict					  =  {"vocab_file": "vocab.json", "merges_file": "merges.txt", "tokenizer_file": "tokenizer.json"}

_lowerCamelCase					:     List[str]					  =  {
    "vocab_file": {
        "allenai/longformer-base-4096": "https://huggingface.co/allenai/longformer-base-4096/resolve/main/vocab.json",
        "allenai/longformer-large-4096": (
            "https://huggingface.co/allenai/longformer-large-4096/resolve/main/vocab.json"
        ),
        "allenai/longformer-large-4096-finetuned-triviaqa": (
            "https://huggingface.co/allenai/longformer-large-4096-finetuned-triviaqa/resolve/main/vocab.json"
        ),
        "allenai/longformer-base-4096-extra.pos.embd.only": (
            "https://huggingface.co/allenai/longformer-base-4096-extra.pos.embd.only/resolve/main/vocab.json"
        ),
        "allenai/longformer-large-4096-extra.pos.embd.only": (
            "https://huggingface.co/allenai/longformer-large-4096-extra.pos.embd.only/resolve/main/vocab.json"
        ),
    },
    "merges_file": {
        "allenai/longformer-base-4096": "https://huggingface.co/allenai/longformer-base-4096/resolve/main/merges.txt",
        "allenai/longformer-large-4096": (
            "https://huggingface.co/allenai/longformer-large-4096/resolve/main/merges.txt"
        ),
        "allenai/longformer-large-4096-finetuned-triviaqa": (
            "https://huggingface.co/allenai/longformer-large-4096-finetuned-triviaqa/resolve/main/merges.txt"
        ),
        "allenai/longformer-base-4096-extra.pos.embd.only": (
            "https://huggingface.co/allenai/longformer-base-4096-extra.pos.embd.only/resolve/main/merges.txt"
        ),
        "allenai/longformer-large-4096-extra.pos.embd.only": (
            "https://huggingface.co/allenai/longformer-large-4096-extra.pos.embd.only/resolve/main/merges.txt"
        ),
    },
    "tokenizer_file": {
        "allenai/longformer-base-4096": (
            "https://huggingface.co/allenai/longformer-base-4096/resolve/main/tokenizer.json"
        ),
        "allenai/longformer-large-4096": (
            "https://huggingface.co/allenai/longformer-large-4096/resolve/main/tokenizer.json"
        ),
        "allenai/longformer-large-4096-finetuned-triviaqa": (
            "https://huggingface.co/allenai/longformer-large-4096-finetuned-triviaqa/resolve/main/tokenizer.json"
        ),
        "allenai/longformer-base-4096-extra.pos.embd.only": (
            "https://huggingface.co/allenai/longformer-base-4096-extra.pos.embd.only/resolve/main/tokenizer.json"
        ),
        "allenai/longformer-large-4096-extra.pos.embd.only": (
            "https://huggingface.co/allenai/longformer-large-4096-extra.pos.embd.only/resolve/main/tokenizer.json"
        ),
    },
}

_lowerCamelCase					:     Dict					  =  {
    "allenai/longformer-base-4096": 4_0_9_6,
    "allenai/longformer-large-4096": 4_0_9_6,
    "allenai/longformer-large-4096-finetuned-triviaqa": 4_0_9_6,
    "allenai/longformer-base-4096-extra.pos.embd.only": 4_0_9_6,
    "allenai/longformer-large-4096-extra.pos.embd.only": 4_0_9_6,
}
class 				__snake_case     (_a						):
				lowerCAmelCase__			=   VOCAB_FILES_NAMES
				lowerCAmelCase__			=   PRETRAINED_VOCAB_FILES_MAP
				lowerCAmelCase__			=   PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
				lowerCAmelCase__			=   ["input_ids", "attention_mask"]
				lowerCAmelCase__			=   LongformerTokenizer



				def __init__(					self					:						Optional[Any]						,		_UpperCAmelCase					:						Tuple=None						,		_UpperCAmelCase					:						List[str]=None						,		_UpperCAmelCase					:						List[str]=None						,		_UpperCAmelCase					:						Union[str, Any]="replace"						,		_UpperCAmelCase					:						str="<s>"						,		_UpperCAmelCase					:						str="</s>"						,		_UpperCAmelCase					:						int="</s>"						,		_UpperCAmelCase					:						str="<s>"						,		_UpperCAmelCase					:						Optional[Any]="<unk>"						,		_UpperCAmelCase					:						Optional[Any]="<pad>"						,		_UpperCAmelCase					:						Any="<mask>"						,		_UpperCAmelCase					:						Optional[int]=False						,		_UpperCAmelCase					:						List[str]=True						,		**_UpperCAmelCase					:						Optional[int]						,		)     ->			str:





								'''simple docstring'''




								super().__init__(
								    _UpperCAmelCase						,		_UpperCAmelCase						,		tokenizer_file=_UpperCAmelCase						,		errors=_UpperCAmelCase						,		bos_token=_UpperCAmelCase						,		eos_token=_UpperCAmelCase						,		sep_token=_UpperCAmelCase						,		cls_token=_UpperCAmelCase						,		unk_token=_UpperCAmelCase						,		pad_token=_UpperCAmelCase						,		mask_token=_UpperCAmelCase						,		add_prefix_space=_UpperCAmelCase						,		trim_offsets=_UpperCAmelCase						,		**_UpperCAmelCase						,		)

								_lowerCAmelCase			:			Tuple        =					json.loads(self.backend_tokenizer.pre_tokenizer.__getstate__()					)
								if pre_tok_state.get("""add_prefix_space"""						,		_UpperCAmelCase					) != add_prefix_space:
												_lowerCAmelCase			:			str        =					getattr(_UpperCAmelCase						,		pre_tok_state.pop("""type"""					)					)
												_lowerCAmelCase			:			Dict        =					add_prefix_space
												_lowerCAmelCase			:			Union[str, Any]        =					pre_tok_class(**_UpperCAmelCase					)

								_lowerCAmelCase			:			List[Any]        =					add_prefix_space

								_lowerCAmelCase			:			List[str]        =					"""post_processor"""
								_lowerCAmelCase			:			str        =					getattr(self.backend_tokenizer						,		_UpperCAmelCase						,		_UpperCAmelCase					)
								if tokenizer_component_instance:
												_lowerCAmelCase			:			Any        =					json.loads(tokenizer_component_instance.__getstate__()					)

												# The lists 'sep' and 'cls' must be cased in tuples for the object `post_processor_class`
												if "sep" in state:
																_lowerCAmelCase			:			str        =					tuple(state["""sep"""]					)
												if "cls" in state:
																_lowerCAmelCase			:			int        =					tuple(state["""cls"""]					)

												_lowerCAmelCase			:			Any        =					False

												if state.get("""add_prefix_space"""						,		_UpperCAmelCase					) != add_prefix_space:
																_lowerCAmelCase			:			int        =					add_prefix_space
																_lowerCAmelCase			:			List[str]        =					True

												if state.get("""trim_offsets"""						,		_UpperCAmelCase					) != trim_offsets:
																_lowerCAmelCase			:			List[str]        =					trim_offsets
																_lowerCAmelCase			:			List[str]        =					True

												if changes_to_apply:
																_lowerCAmelCase			:			List[str]        =					getattr(_UpperCAmelCase						,		state.pop("""type"""					)					)
																_lowerCAmelCase			:			Any        =					component_class(**_UpperCAmelCase					)
																setattr(self.backend_tokenizer						,		_UpperCAmelCase						,		_UpperCAmelCase					)



				@property
				def 					SCREAMING_SNAKE_CASE				(					self					:						List[Any]					)     ->			str:





								'''simple docstring'''




								if self._mask_token is None:
												if self.verbose:
																logger.error("""Using mask_token, but it is not set yet."""					)
												return None
								return str(self._mask_token					)



				@mask_token.setter
				def 					SCREAMING_SNAKE_CASE				(					self					:						Any						,		_UpperCAmelCase					:						Any					)     ->			Tuple:





								'''simple docstring'''




								_lowerCAmelCase			:			Tuple        =					AddedToken(_UpperCAmelCase						,		lstrip=_UpperCAmelCase						,		rstrip=_UpperCAmelCase					) if isinstance(_UpperCAmelCase						,		_UpperCAmelCase					) else value
								_lowerCAmelCase			:			List[Any]        =					value



				def 					SCREAMING_SNAKE_CASE				(					self					:						int						,		*_UpperCAmelCase					:						str						,		**_UpperCAmelCase					:						Union[str, Any]					)     ->			BatchEncoding:





								'''simple docstring'''




								_lowerCAmelCase			:			Dict        =					kwargs.get("""is_split_into_words"""						,		_UpperCAmelCase					)
								assert self.add_prefix_space or not is_split_into_words, (
								    f"You need to instantiate {self.__class__.__name__} with add_prefix_space=True "
								    "to use it with pretokenized inputs."
								)

								return super()._batch_encode_plus(*_UpperCAmelCase						,		**_UpperCAmelCase					)



				def 					SCREAMING_SNAKE_CASE				(					self					:						str						,		*_UpperCAmelCase					:						Any						,		**_UpperCAmelCase					:						Optional[Any]					)     ->			BatchEncoding:





								'''simple docstring'''




								_lowerCAmelCase			:			Any        =					kwargs.get("""is_split_into_words"""						,		_UpperCAmelCase					)

								assert self.add_prefix_space or not is_split_into_words, (
								    f"You need to instantiate {self.__class__.__name__} with add_prefix_space=True "
								    "to use it with pretokenized inputs."
								)

								return super()._encode_plus(*_UpperCAmelCase						,		**_UpperCAmelCase					)



				def 					SCREAMING_SNAKE_CASE				(					self					:						Dict						,		_UpperCAmelCase					:						str						,		_UpperCAmelCase					:						Optional[str] = None					)     ->			Tuple[str]:





								'''simple docstring'''




								_lowerCAmelCase			:			int        =					self._tokenizer.model.save(_UpperCAmelCase						,		name=_UpperCAmelCase					)
								return tuple(_UpperCAmelCase					)



				def 					SCREAMING_SNAKE_CASE				(					self					:						Any						,		_UpperCAmelCase					:						Any						,		_UpperCAmelCase					:						str=None					)     ->			List[Any]:





								'''simple docstring'''




								_lowerCAmelCase			:			Any        =					[self.bos_token_id] + token_ids_a + [self.eos_token_id]
								if token_ids_a is None:
												return output

								return output + [self.eos_token_id] + token_ids_a + [self.eos_token_id]



				def 					SCREAMING_SNAKE_CASE				(					self					:						List[Any]						,		_UpperCAmelCase					:						List[int]						,		_UpperCAmelCase					:						Optional[List[int]] = None					)     ->			List[int]:





								'''simple docstring'''




								_lowerCAmelCase			:			Dict        =					[self.sep_token_id]
								_lowerCAmelCase			:			Optional[Any]        =					[self.cls_token_id]

								if token_ids_a is None:
												return len(cls + token_ids_a + sep					) * [0]
								return len(cls + token_ids_a + sep + sep + token_ids_a + sep					) * [0]

