

import argparse

import torch
from torch import nn

from transformers import MaMaaaConfig, MaMaaaForConditionalGeneration

def 							__SCREAMING_SNAKE_CASE							(				lowerCAmelCase:  Union[str, Any] )   ->       Optional[Any]:
				_UpperCAmelCase       :		int 		=    [
				    "encoder.version",
				    "decoder.version",
				    "model.encoder.version",
				    "model.decoder.version",
				    "decoder.output_projection.weight",
				    "_float_tensor",
				    "encoder.embed_positions._float_tensor",
				    "decoder.embed_positions._float_tensor",
				]
				for k in ignore_keys:
								state_dict.pop(lowerCAmelCase  ,      lowerCAmelCase )

def 							__SCREAMING_SNAKE_CASE							(				lowerCAmelCase:  List[str] )   ->       Any:
				_UpperCAmelCase		,							_UpperCAmelCase       :		int 		=    emb.weight.shape
				_UpperCAmelCase       :		Union[str, Any] 		=    nn.Linear(lowerCAmelCase  ,      lowerCAmelCase  ,      bias=lowerCAmelCase )
				_UpperCAmelCase       :		int 		=    emb.weight.data
				return lin_layer

def 							__SCREAMING_SNAKE_CASE							(				lowerCAmelCase:  str )   ->       List[str]:
				_UpperCAmelCase       :		Union[str, Any] 		=    torch.load(lowerCAmelCase  ,      map_location="cpu" )
				_UpperCAmelCase       :		List[str] 		=    mam_aaa["args"] or mam_aaa["cfg"]["model"]
				_UpperCAmelCase       :		Optional[Any] 		=    mam_aaa["model"]
				remove_ignore_keys_(lowerCAmelCase )
				_UpperCAmelCase       :		List[str] 		=    state_dict["encoder.embed_tokens.weight"].shape[0]

				_UpperCAmelCase       :		str 		=    MaMaaaConfig(
				    vocab_size=lowerCAmelCase  ,      max_position_embeddings=1024  ,      encoder_layers=args.encoder_layers  ,      decoder_layers=args.decoder_layers  ,      encoder_attention_heads=args.encoder_attention_heads  ,      decoder_attention_heads=args.decoder_attention_heads  ,      encoder_ffn_dim=args.encoder_ffn_embed_dim  ,      decoder_ffn_dim=args.decoder_ffn_embed_dim  ,      d_model=args.encoder_embed_dim  ,      encoder_layerdrop=args.encoder_layerdrop  ,      decoder_layerdrop=args.decoder_layerdrop  ,      dropout=args.dropout  ,      attention_dropout=args.attention_dropout  ,      activation_dropout=args.activation_dropout  ,      activation_function="relu"  ,      )

				_UpperCAmelCase       :		Optional[Any] 		=    state_dict["decoder.embed_tokens.weight"]
				_UpperCAmelCase       :		Union[str, Any] 		=    MaMaaaForConditionalGeneration(lowerCAmelCase )
				model.model.load_state_dict(lowerCAmelCase  ,      strict=lowerCAmelCase )
				_UpperCAmelCase       :		Optional[int] 		=    make_linear_from_emb(model.model.shared )

				return model


if __name__ == "__main__":
					SCREAMING_SNAKE_CASE_        =      argparse.ArgumentParser()
					# Required parameters
					parser.add_argument('fairseq_path', type=str, help='path to a model.pt on local filesystem.')
					parser.add_argument('pytorch_dump_folder_path', default=None, type=str, help='Path to the output PyTorch model.')
					SCREAMING_SNAKE_CASE_        =      parser.parse_args()
					SCREAMING_SNAKE_CASE_        =      convert_fairseq_mamaaa_checkpoint_from_disk(args.fairseq_pathß)
					model.save_pretrained(args.pytorch_dump_folder_path)





import gc
import unittest

from transformers import MODEL_FOR_MASKED_LM_MAPPING, TF_MODEL_FOR_MASKED_LM_MAPPING, FillMaskPipeline, pipeline
from transformers.pipelines import PipelineException
from transformers.testing_utils import (
    is_pipeline_test,
    is_torch_available,
    nested_simplify,
    require_tf,
    require_torch,
    require_torch_gpu,
    slow,
)

from .test_pipelines_common import ANY

@is_pipeline_test
class 				a  (	unittest.TestCase				):
						_lowercase    						=			MODEL_FOR_MASKED_LM_MAPPING
						_lowercase    						=			TF_MODEL_FOR_MASKED_LM_MAPPING


						def        _UpperCAmelCase				(       self	):







										'''simple docstring'''


										super().tearDown()
										# clean-up as much as possible GPU memory occupied by PyTorch
										gc.collect()
										if is_torch_available():
														import torch

														torch.cuda.empty_cache()


						@require_tf
						def        _UpperCAmelCase				(       self	):







										'''simple docstring'''


										_UpperCAmelCase       :		List[str] 		=    pipeline(task="fill-mask"						,					model="sshleifer/tiny-distilroberta-base"						,					top_k=2						,					framework="tf"	)
										_UpperCAmelCase       :		Union[str, Any] 		=    unmasker("My name is <mask>"	)
										self.assertEqual(
										    nested_simplify(A_						,					decimals=6	)						,					[
										        {"sequence": "My name is grouped", "score": 2.1e-05, "token": 38015, "token_str": " grouped"},
										        {"sequence": "My name is accuser", "score": 2.1e-05, "token": 25506, "token_str": " accuser"},
										    ]						,					)

										_UpperCAmelCase       :		Optional[int] 		=    unmasker("The largest city in France is <mask>"	)
										self.assertEqual(
										    nested_simplify(A_						,					decimals=6	)						,					[
										        {
										            "sequence": "The largest city in France is grouped",
										            "score": 2.1e-05,
										            "token": 38015,
										            "token_str": " grouped",
										        },
										        {
										            "sequence": "The largest city in France is accuser",
										            "score": 2.1e-05,
										            "token": 25506,
										            "token_str": " accuser",
										        },
										    ]						,					)

										_UpperCAmelCase       :		Optional[Any] 		=    unmasker("My name is <mask>"						,					targets=[" Patrick", " Clara", " Teven"]						,					top_k=3	)
										self.assertEqual(
										    nested_simplify(A_						,					decimals=6	)						,					[
										        {"sequence": "My name is Clara", "score": 2e-05, "token": 13606, "token_str": " Clara"},
										        {"sequence": "My name is Patrick", "score": 2e-05, "token": 3499, "token_str": " Patrick"},
										        {"sequence": "My name is Te", "score": 1.9e-05, "token": 2941, "token_str": " Te"},
										    ]						,					)


						@require_torch
						def        _UpperCAmelCase				(       self	):







										'''simple docstring'''


										_UpperCAmelCase       :		Optional[Any] 		=    pipeline(task="fill-mask"						,					model="sshleifer/tiny-distilroberta-base"						,					top_k=2						,					framework="pt"	)

										_UpperCAmelCase       :		List[str] 		=    unmasker("My name is <mask>"	)
										self.assertEqual(
										    nested_simplify(A_						,					decimals=6	)						,					[
										        {"sequence": "My name is Maul", "score": 2.2e-05, "token": 35676, "token_str": " Maul"},
										        {"sequence": "My name isELS", "score": 2.2e-05, "token": 16416, "token_str": "ELS"},
										    ]						,					)

										_UpperCAmelCase       :		str 		=    unmasker("The largest city in France is <mask>"	)
										self.assertEqual(
										    nested_simplify(A_						,					decimals=6	)						,					[
										        {
										            "sequence": "The largest city in France is Maul",
										            "score": 2.2e-05,
										            "token": 35676,
										            "token_str": " Maul",
										        },
										        {"sequence": "The largest city in France isELS", "score": 2.2e-05, "token": 16416, "token_str": "ELS"},
										    ]						,					)

										_UpperCAmelCase       :		List[Any] 		=    unmasker("My name is <mask>"						,					targets=[" Patrick", " Clara", " Teven"]						,					top_k=3	)
										self.assertEqual(
										    nested_simplify(A_						,					decimals=6	)						,					[
										        {"sequence": "My name is Patrick", "score": 2.1e-05, "token": 3499, "token_str": " Patrick"},
										        {"sequence": "My name is Te", "score": 2e-05, "token": 2941, "token_str": " Te"},
										        {"sequence": "My name is Clara", "score": 2e-05, "token": 13606, "token_str": " Clara"},
										    ]						,					)

										_UpperCAmelCase       :		Optional[Any] 		=    unmasker("My name is <mask> <mask>"						,					top_k=2	)

										self.assertEqual(
										    nested_simplify(A_						,					decimals=6	)						,					[
										        [
										            {
										                "score": 2.2e-05,
										                "token": 35676,
										                "token_str": " Maul",
										                "sequence": "<s>My name is Maul<mask></s>",
										            },
										            {"score": 2.2e-05, "token": 16416, "token_str": "ELS", "sequence": "<s>My name isELS<mask></s>"},
										        ],
										        [
										            {
										                "score": 2.2e-05,
										                "token": 35676,
										                "token_str": " Maul",
										                "sequence": "<s>My name is<mask> Maul</s>",
										            },
										            {"score": 2.2e-05, "token": 16416, "token_str": "ELS", "sequence": "<s>My name is<mask>ELS</s>"},
										        ],
										    ]						,					)


						@require_torch_gpu
						def        _UpperCAmelCase				(       self	):







										'''simple docstring'''


										_UpperCAmelCase       :		Union[str, Any] 		=    pipeline("fill-mask"						,					model="hf-internal-testing/tiny-random-distilbert"						,					device=0						,					framework="pt"	)

										# convert model to fp16
										pipe.model.half()

										_UpperCAmelCase       :		int 		=    pipe("Paris is the [MASK] of France."	)
										# We actually don't care about the result, we just want to make sure
										# it works, meaning the float16 tensor got casted back to float32
										# for postprocessing.
										self.assertIsInstance(A_						,					A_	)


						@slow
						@require_torch
						def        _UpperCAmelCase				(       self	):







										'''simple docstring'''


										_UpperCAmelCase       :		List[Any] 		=    pipeline(task="fill-mask"						,					model="distilroberta-base"						,					top_k=2						,					framework="pt"	)
										self.run_large_test(A_	)


						@slow
						@require_tf
						def        _UpperCAmelCase				(       self	):







										'''simple docstring'''


										_UpperCAmelCase       :		List[str] 		=    pipeline(task="fill-mask"						,					model="distilroberta-base"						,					top_k=2						,					framework="tf"	)
										self.run_large_test(A_	)


						def        _UpperCAmelCase				(       self						,					A_	):







										'''simple docstring'''


										_UpperCAmelCase       :		int 		=    unmasker("My name is <mask>"	)
										self.assertEqual(
										    nested_simplify(A_	)						,					[
										        {"sequence": "My name is John", "score": 0.0_08, "token": 610, "token_str": " John"},
										        {"sequence": "My name is Chris", "score": 0.0_07, "token": 1573, "token_str": " Chris"},
										    ]						,					)
										_UpperCAmelCase       :		Optional[int] 		=    unmasker("The largest city in France is <mask>"	)
										self.assertEqual(
										    nested_simplify(A_	)						,					[
										        {
										            "sequence": "The largest city in France is Paris",
										            "score": 0.2_51,
										            "token": 2201,
										            "token_str": " Paris",
										        },
										        {
										            "sequence": "The largest city in France is Lyon",
										            "score": 0.2_14,
										            "token": 12790,
										            "token_str": " Lyon",
										        },
										    ]						,					)

										_UpperCAmelCase       :		Any 		=    unmasker("My name is <mask>"						,					targets=[" Patrick", " Clara", " Teven"]						,					top_k=3	)
										self.assertEqual(
										    nested_simplify(A_	)						,					[
										        {"sequence": "My name is Patrick", "score": 0.0_05, "token": 3499, "token_str": " Patrick"},
										        {"sequence": "My name is Clara", "score": 0.0_00, "token": 13606, "token_str": " Clara"},
										        {"sequence": "My name is Te", "score": 0.0_00, "token": 2941, "token_str": " Te"},
										    ]						,					)


						@require_torch
						def        _UpperCAmelCase				(       self	):







										'''simple docstring'''


										_UpperCAmelCase       :		List[str] 		=    pipeline(task="fill-mask"						,					model="sshleifer/tiny-distilroberta-base"						,					framework="pt"	)
										_UpperCAmelCase       :		Optional[int] 		=    None
										_UpperCAmelCase       :		List[Any] 		=    None
										self.run_pipeline_test(A_						,					[]	)


						@require_tf
						def        _UpperCAmelCase				(       self	):







										'''simple docstring'''


										_UpperCAmelCase       :		Tuple 		=    pipeline(task="fill-mask"						,					model="sshleifer/tiny-distilroberta-base"						,					framework="tf"	)
										_UpperCAmelCase       :		Union[str, Any] 		=    None
										_UpperCAmelCase       :		str 		=    None
										self.run_pipeline_test(A_						,					[]	)


						def        _UpperCAmelCase				(       self						,					A_						,					A_						,					A_	):







										'''simple docstring'''


										if tokenizer is None or tokenizer.mask_token_id is None:
														self.skipTest("The provided tokenizer has no mask token, (probably reformer or wav2vec2)"	)

										_UpperCAmelCase       :		Tuple 		=    FillMaskPipeline(model=A_						,					tokenizer=A_	)
										_UpperCAmelCase       :		Tuple 		=    [
										    f'This is another {tokenizer.mask_token} test',
										]
										return fill_masker, examples


						def        _UpperCAmelCase				(       self						,					A_						,					A_	):







										'''simple docstring'''


										_UpperCAmelCase       :		Dict 		=    fill_masker.tokenizer
										_UpperCAmelCase       :		Tuple 		=    fill_masker.model

										_UpperCAmelCase       :		Union[str, Any] 		=    fill_masker(
										    f'This is a {tokenizer.mask_token}'						,					)
										self.assertEqual(
										    A_						,					[
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										    ]						,					)

										_UpperCAmelCase       :		Optional[Any] 		=    fill_masker([f'This is a {tokenizer.mask_token}']	)
										self.assertEqual(
										    A_						,					[
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										    ]						,					)

										_UpperCAmelCase       :		List[str] 		=    fill_masker([f'This is a {tokenizer.mask_token}', f'Another {tokenizer.mask_token} great test.']	)
										self.assertEqual(
										    A_						,					[
										        [
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        ],
										        [
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        ],
										    ]						,					)

										with self.assertRaises(A_	):
														fill_masker([None]	)
										# No mask_token is not supported
										with self.assertRaises(A_	):
														fill_masker("This is"	)

										self.run_test_top_k(A_						,					A_	)
										self.run_test_targets(A_						,					A_	)
										self.run_test_top_k_targets(A_						,					A_	)
										self.fill_mask_with_duplicate_targets_and_top_k(A_						,					A_	)
										self.fill_mask_with_multiple_masks(A_						,					A_	)


						def        _UpperCAmelCase				(       self						,					A_						,					A_	):







										'''simple docstring'''


										_UpperCAmelCase       :		Any 		=    tokenizer.get_vocab()
										_UpperCAmelCase       :		int 		=    sorted(vocab.keys()	)[:2]
										# Pipeline argument
										_UpperCAmelCase       :		Any 		=    FillMaskPipeline(model=A_						,					tokenizer=A_						,					targets=A_	)
										_UpperCAmelCase       :		Optional[int] 		=    fill_masker(f'This is a {tokenizer.mask_token}'	)
										self.assertEqual(
										    A_						,					[
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										    ]						,					)
										_UpperCAmelCase       :		Tuple 		=    {vocab[el] for el in targets}
										self.assertEqual({el["token"] for el in outputs}						,					A_	)
										_UpperCAmelCase       :		List[Any] 		=    [tokenizer.decode([x]	) for x in target_ids]
										self.assertEqual({el["token_str"] for el in outputs}						,					set(A_	)	)

										# Call argument
										_UpperCAmelCase       :		Union[str, Any] 		=    FillMaskPipeline(model=A_						,					tokenizer=A_	)
										_UpperCAmelCase       :		List[Any] 		=    fill_masker(f'This is a {tokenizer.mask_token}'						,					targets=A_	)
										self.assertEqual(
										    A_						,					[
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										    ]						,					)
										_UpperCAmelCase       :		Optional[Any] 		=    {vocab[el] for el in targets}
										self.assertEqual({el["token"] for el in outputs}						,					A_	)
										_UpperCAmelCase       :		Any 		=    [tokenizer.decode([x]	) for x in target_ids]
										self.assertEqual({el["token_str"] for el in outputs}						,					set(A_	)	)

										# Score equivalence
										_UpperCAmelCase       :		int 		=    fill_masker(f'This is a {tokenizer.mask_token}'						,					targets=A_	)
										_UpperCAmelCase       :		Tuple 		=    [top_mask["token_str"] for top_mask in outputs]
										_UpperCAmelCase       :		Union[str, Any] 		=    [top_mask["score"] for top_mask in outputs]

										# For some BPE tokenizers, `</w>` is removed during decoding, so `token_str` won't be the same as in `targets`.
										if set(A_	) == set(A_	):
														_UpperCAmelCase       :		List[str] 		=    fill_masker(f'This is a {tokenizer.mask_token}'						,					targets=A_	)
														_UpperCAmelCase       :		List[str] 		=    [top_mask["score"] for top_mask in unmasked_targets]
														self.assertEqual(nested_simplify(A_	)						,					nested_simplify(A_	)	)

										# Raises with invalid
										with self.assertRaises(A_	):
														_UpperCAmelCase       :		Optional[int] 		=    fill_masker(f'This is a {tokenizer.mask_token}'						,					targets=[]	)
										# For some tokenizers, `""` is actually in the vocabulary and the expected error won't raised
										if "" not in tokenizer.get_vocab():
														with self.assertRaises(A_	):
																		_UpperCAmelCase       :		Dict 		=    fill_masker(f'This is a {tokenizer.mask_token}'						,					targets=[""]	)
														with self.assertRaises(A_	):
																		_UpperCAmelCase       :		List[str] 		=    fill_masker(f'This is a {tokenizer.mask_token}'						,					targets=""	)


						def        _UpperCAmelCase				(       self						,					A_						,					A_	):







										'''simple docstring'''


										_UpperCAmelCase       :		Union[str, Any] 		=    FillMaskPipeline(model=A_						,					tokenizer=A_						,					top_k=2	)
										_UpperCAmelCase       :		Union[str, Any] 		=    fill_masker(f'This is a {tokenizer.mask_token}'	)
										self.assertEqual(
										    A_						,					[
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										    ]						,					)

										_UpperCAmelCase       :		int 		=    FillMaskPipeline(model=A_						,					tokenizer=A_	)
										_UpperCAmelCase       :		Optional[Any] 		=    fill_masker(f'This is a {tokenizer.mask_token}'						,					top_k=2	)
										self.assertEqual(
										    A_						,					[
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										    ]						,					)
										self.assertEqual(nested_simplify(A_	)						,					nested_simplify(A_	)	)


						def        _UpperCAmelCase				(       self						,					A_						,					A_	):







										'''simple docstring'''


										_UpperCAmelCase       :		int 		=    tokenizer.get_vocab()
										_UpperCAmelCase       :		Union[str, Any] 		=    FillMaskPipeline(model=A_						,					tokenizer=A_	)

										# top_k=2, ntargets=3
										_UpperCAmelCase       :		Tuple 		=    sorted(vocab.keys()	)[:3]
										_UpperCAmelCase       :		Union[str, Any] 		=    fill_masker(f'This is a {tokenizer.mask_token}'						,					top_k=2						,					targets=A_	)

										# If we use the most probably targets, and filter differently, we should still
										# have the same results
										_UpperCAmelCase       :		Tuple 		=    [el["token_str"] for el in sorted(A_						,					key=lambda A_	: x["score"]						,					reverse=A_	)]
										# For some BPE tokenizers, `</w>` is removed during decoding, so `token_str` won't be the same as in `targets`.
										if set(A_	).issubset(A_	):
														_UpperCAmelCase       :		int 		=    fill_masker(f'This is a {tokenizer.mask_token}'						,					top_k=3						,					targets=A_	)
														# They should yield exactly the same result
														self.assertEqual(nested_simplify(A_	)						,					nested_simplify(A_	)	)


						def        _UpperCAmelCase				(       self						,					A_						,					A_	):







										'''simple docstring'''


										_UpperCAmelCase       :		Tuple 		=    FillMaskPipeline(model=A_						,					tokenizer=A_	)
										_UpperCAmelCase       :		Dict 		=    tokenizer.get_vocab()
										# String duplicates + id duplicates
										_UpperCAmelCase       :		Dict 		=    sorted(vocab.keys()	)[:3]
										_UpperCAmelCase       :		Tuple 		=    [targets[0], targets[1], targets[0], targets[2], targets[1]]
										_UpperCAmelCase       :		Dict 		=    fill_masker(f'My name is {tokenizer.mask_token}'						,					targets=A_						,					top_k=10	)

										# The target list contains duplicates, so we can't output more
										# than them
										self.assertEqual(len(A_	)						,					3	)





						def        _UpperCAmelCase				(       self						,					A_						,					A_	):







										'''simple docstring'''


										_UpperCAmelCase       :		int 		=    FillMaskPipeline(model=A_						,					tokenizer=A_	)

										_UpperCAmelCase       :		List[str] 		=    fill_masker(
										    f'This is a {tokenizer.mask_token} {tokenizer.mask_token} {tokenizer.mask_token}'						,					top_k=2	)
										self.assertEqual(
										    A_						,					[
										        [
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        ],
										        [
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        ],
										        [
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										            {"sequence": ANY(A_	), "score": ANY(A_	), "token": ANY(A_	), "token_str": ANY(A_	)},
										        ],
										    ]						,					)


