






import inspect
import unittest
import warnings

from transformers import DeiTConfig
from transformers.models.auto import get_values
from transformers.testing_utils import (
    require_accelerate,
    require_torch,
    require_torch_gpu,
    require_vision,
    slow,
    torch_device,
)
from transformers.utils import cached_property, is_torch_available, is_vision_available

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
				import torch
				from torch import nn

				from transformers import (
				    MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING,
				    MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING,
				    MODEL_MAPPING,
				    DeiTForImageClassification,
				    DeiTForImageClassificationWithTeacher,
				    DeiTForMaskedImageModeling,
				    DeiTModel,
				)
				from transformers.models.deit.modeling_deit import DEIT_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
				from PIL import Image

				from transformers import DeiTImageProcessor





class 						SCREAMING_SNAKE_CASE				:





							"""simple docstring"""

							def __init__(  self:   str		,     __A:   Any		,     __A:   Union[str, Any]=13		,     __A:   Union[str, Any]=30		,     __A:   int=2		,     __A:   Optional[Any]=3		,     __A:   Any=True		,     __A:   Any=True		,     __A:   Any=32		,     __A:   Tuple=5		,     __A:   int=4		,     __A:   Optional[Any]=37		,     __A:   Optional[int]="gelu"		,     __A:   str=0.1		,     __A:   Any=0.1		,     __A:   Optional[int]=10		,     __A:   Any=0.02		,     __A:   Any=3		,     __A:   Union[str, Any]=None		,     __A:   int=2		,     )    ->				str:
												_A								= parent
												_A								= batch_size
												_A								= image_size
												_A								= patch_size
												_A								= num_channels
												_A								= is_training
												_A								= use_labels
												_A								= hidden_size
												_A								= num_hidden_layers
												_A								= num_attention_heads
												_A								= intermediate_size
												_A								= hidden_act
												_A								= hidden_dropout_prob
												_A								= attention_probs_dropout_prob
												_A								= type_sequence_label_size
												_A								= initializer_range
												_A								= scope
												_A								= encoder_stride

												# in DeiT, the seq length equals the number of patches + 2 (we add 2 for the [CLS] and distilation tokens)
												_A								= (image_size // patch_size) ** 2
												_A								= num_patches + 2

							def       __A (  self:   Dict   )    ->				Optional[Any]:
												_A								= floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]   )

												_A								= None
												if self.use_labels:
																	_A								= ids_tensor([self.batch_size]		,     self.type_sequence_label_size   )

												_A								= self.get_config()

												return config, pixel_values, labels

							def       __A (  self:   Optional[int]   )    ->				Dict:
												return DeiTConfig(
												    image_size=self.image_size		,     patch_size=self.patch_size		,     num_channels=self.num_channels		,     hidden_size=self.hidden_size		,     num_hidden_layers=self.num_hidden_layers		,     num_attention_heads=self.num_attention_heads		,     intermediate_size=self.intermediate_size		,     hidden_act=self.hidden_act		,     hidden_dropout_prob=self.hidden_dropout_prob		,     attention_probs_dropout_prob=self.attention_probs_dropout_prob		,     is_decoder=__A		,     initializer_range=self.initializer_range		,     encoder_stride=self.encoder_stride		,     )

							def       __A (  self:   int		,     __A:   Union[str, Any]		,     __A:   int		,     __A:   Any   )    ->				List[Any]:
												_A								= DeiTModel(config=__A   )
												model.to(__A   )
												model.eval()
												_A								= model(__A   )
												self.parent.assertEqual(result.last_hidden_state.shape		,     (self.batch_size, self.seq_length, self.hidden_size)   )

							def       __A (  self:   Optional[Any]		,     __A:   Any		,     __A:   int		,     __A:   List[str]   )    ->				Any:
												_A								= DeiTForMaskedImageModeling(config=__A   )
												model.to(__A   )
												model.eval()
												_A								= model(__A   )
												self.parent.assertEqual(
												    result.reconstruction.shape		,     (self.batch_size, self.num_channels, self.image_size, self.image_size)   )

												# test greyscale images
												_A								= 1
												_A								= DeiTForMaskedImageModeling(__A   )
												model.to(__A   )
												model.eval()

												_A								= floats_tensor([self.batch_size, 1, self.image_size, self.image_size]   )
												_A								= model(__A   )
												self.parent.assertEqual(result.reconstruction.shape		,     (self.batch_size, 1, self.image_size, self.image_size)   )

							def       __A (  self:   Dict		,     __A:   Optional[int]		,     __A:   Dict		,     __A:   str   )    ->				Union[str, Any]:
												_A								= self.type_sequence_label_size
												_A								= DeiTForImageClassification(__A   )
												model.to(__A   )
												model.eval()
												_A								= model(__A		,     labels=__A   )
												self.parent.assertEqual(result.logits.shape		,     (self.batch_size, self.type_sequence_label_size)   )

												# test greyscale images
												_A								= 1
												_A								= DeiTForImageClassification(__A   )
												model.to(__A   )
												model.eval()

												_A								= floats_tensor([self.batch_size, 1, self.image_size, self.image_size]   )
												_A								= model(__A		,     labels=__A   )
												self.parent.assertEqual(result.logits.shape		,     (self.batch_size, self.type_sequence_label_size)   )



							def       __A (  self:   str   )    ->				str:
												_A								= self.prepare_config_and_inputs()
												(
												    (
												    _A
												)							,(
												    _A
												)							,(
												    _A
												)							,
												)								= config_and_inputs
												_A								= {'''pixel_values''': pixel_values}
												return config, inputs_dict





@require_torch
class 						SCREAMING_SNAKE_CASE				( snake_case  ,	snake_case  ,	unittest.TestCase					):





							"""simple docstring"""

							A_						  =					(
							    (
							        DeiTModel,
							        DeiTForImageClassification,
							        DeiTForImageClassificationWithTeacher,
							        DeiTForMaskedImageModeling,
							    )
							    if is_torch_available()
							    else ()
							)
							A_						  =					(
							    {
							        "feature-extraction": DeiTModel,
							        "image-classification": (DeiTForImageClassification, DeiTForImageClassificationWithTeacher),
							    }
							    if is_torch_available()
							    else {}
							)

							A_						  =					False
							A_						  =					False
							A_						  =					False

							def       __A (  self:   List[Any]   )    ->				Optional[int]:
												_A								= DeiTModelTester(self   )
												_A								= ConfigTester(self		,     config_class=__A		,     has_text_modality=__A		,     hidden_size=37   )

							def       __A (  self:   Tuple   )    ->				Dict:
												self.config_tester.run_common_tests()

							@unittest.skip(reason='''DeiT does not use inputs_embeds'''   )
							def       __A (  self:   Optional[int]   )    ->				Union[str, Any]:
												pass

							def       __A (  self:   Tuple   )    ->				str:
												_A							,_A								= self.model_tester.prepare_config_and_inputs_for_common()

												for model_class in self.all_model_classes:
																	_A								= model_class(__A   )
																	self.assertIsInstance(model.get_input_embeddings()		,     (nn.Module)   )
																	_A								= model.get_output_embeddings()
																	self.assertTrue(x is None or isinstance(__A		,     nn.Linear   )   )

							def       __A (  self:   List[str]   )    ->				Tuple:
												_A							,_A								= self.model_tester.prepare_config_and_inputs_for_common()

												for model_class in self.all_model_classes:
																	_A								= model_class(__A   )
																	_A								= inspect.signature(model.forward   )
																	# signature.parameters is an OrderedDict => so arg_names order is deterministic
																	_A								= [*signature.parameters.keys()]

																	_A								= ['''pixel_values''']
																	self.assertListEqual(arg_names[:1]		,     __A   )

							def       __A (  self:   Dict   )    ->				Dict:
												_A								= self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_model(*__A   )

							def       __A (  self:   Optional[int]   )    ->				Tuple:
												_A								= self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_for_masked_image_modeling(*__A   )

							def       __A (  self:   Dict   )    ->				Any:
												_A								= self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_for_image_classification(*__A   )

							def       __A (  self:   Tuple		,     __A:   Optional[Any]		,     __A:   Optional[int]		,     __A:   Tuple=False   )    ->				List[Any]:
												_A								= super()._prepare_for_class(__A		,     __A		,     return_labels=__A   )

												if return_labels:
																	if model_class.__name__ == "DeiTForImageClassificationWithTeacher":
																						del inputs_dict["labels"]

												return inputs_dict

							def       __A (  self:   Tuple   )    ->				Optional[int]:
												if not self.model_tester.is_training:
																	return

												_A							,_A								= self.model_tester.prepare_config_and_inputs_for_common()
												_A								= True

												for model_class in self.all_model_classes:
																	# DeiTForImageClassificationWithTeacher supports inference-only
																	if (
																	    model_class in get_values(__A   )
																	    or model_class.__name__ == "DeiTForImageClassificationWithTeacher"
																	):
																						continue
																	_A								= model_class(__A   )
																	model.to(__A   )
																	model.train()
																	_A								= self._prepare_for_class(__A		,     __A		,     return_labels=__A   )
																	_A								= model(**__A   ).loss
																	loss.backward()

							def       __A (  self:   Optional[Any]   )    ->				Tuple:
												_A							,_A								= self.model_tester.prepare_config_and_inputs_for_common()
												if not self.model_tester.is_training:
																	return

												_A								= False
												_A								= True

												for model_class in self.all_model_classes:
																	if model_class in get_values(__A   ) or not model_class.supports_gradient_checkpointing:
																						continue
																	# DeiTForImageClassificationWithTeacher supports inference-only
																	if model_class.__name__ == "DeiTForImageClassificationWithTeacher":
																						continue
																	_A								= model_class(__A   )
																	model.gradient_checkpointing_enable()
																	model.to(__A   )
																	model.train()
																	_A								= self._prepare_for_class(__A		,     __A		,     return_labels=__A   )
																	_A								= model(**__A   ).loss
																	loss.backward()

							def       __A (  self:   List[Any]   )    ->				str:
												_A							,_A								= self.model_tester.prepare_config_and_inputs_for_common()

												_A								= [
												    {'''title''': '''multi_label_classification''', '''num_labels''': 2, '''dtype''': torch.float},
												    {'''title''': '''single_label_classification''', '''num_labels''': 1, '''dtype''': torch.long},
												    {'''title''': '''regression''', '''num_labels''': 1, '''dtype''': torch.float},
												]

												for model_class in self.all_model_classes:
																	if (
																	    model_class
																	    not in [
																	        *get_values(__A   ),
																	        *get_values(__A   ),
																	    ]
																	    or model_class.__name__ == "DeiTForImageClassificationWithTeacher"
																	):
																						continue

																	for problem_type in problem_types:
																						with self.subTest(msg=f"""Testing {model_class} with {problem_type["title"]}"""   ):
																											_A								= problem_type['''title''']
																											_A								= problem_type['''num_labels''']

																											_A								= model_class(__A   )
																											model.to(__A   )
																											model.train()

																											_A								= self._prepare_for_class(__A		,     __A		,     return_labels=__A   )

																											if problem_type["num_labels"] > 1:
																																_A								= inputs['''labels'''].unsqueeze(1   ).repeat(1		,     problem_type['''num_labels''']   )

																											_A								= inputs['''labels'''].to(problem_type['''dtype''']   )

																											# This tests that we do not trigger the warning form PyTorch "Using a target size that is different
																											# to the input size. This will likely lead to incorrect results due to broadcasting. Please ensure
																											# they have the same size." which is a symptom something in wrong for the regression problem.
																											# See https://github.com/huggingface/transformers/issues/11780
																											with warnings.catch_warnings(record=__A   ) as warning_list:
																																_A								= model(**__A   ).loss
																											for w in warning_list:
																																if "Using a target size that is different to the input size" in str(w.message   ):
																																					raise ValueError(
																																					    f"""Something is going wrong in the regression problem: intercepted {w.message}"""   )

																											loss.backward()



							@slow
							def       __A (  self:   Optional[Any]   )    ->				Union[str, Any]:
												for model_name in DEIT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
																	_A								= DeiTModel.from_pretrained(__A   )
																	self.assertIsNotNone(__A   )




def      __A					(     ):

					'''simple docstring'''







					_A								= Image.open('''./tests/fixtures/tests_samples/COCO/000000039769.png''' )
					return image





@require_torch
@require_vision
class 						SCREAMING_SNAKE_CASE				( unittest.TestCase					):





							"""simple docstring"""

							@cached_property
							def       __A (  self:   Any   )    ->				Optional[int]:
												return (
												    DeiTImageProcessor.from_pretrained('''facebook/deit-base-distilled-patch16-224'''   )
												    if is_vision_available()
												    else None
												)

							@slow
							def       __A (  self:   Dict   )    ->				Any:
												_A								= DeiTForImageClassificationWithTeacher.from_pretrained('''facebook/deit-base-distilled-patch16-224'''   ).to(
												    __A   )

												_A								= self.default_image_processor
												_A								= prepare_img()
												_A								= image_processor(images=__A		,     return_tensors='''pt'''   ).to(__A   )

												# forward pass
												with torch.no_grad():
																	_A								= model(**__A   )

												# verify the logits
												_A								= torch.Size((1, 10_00)   )
												self.assertEqual(outputs.logits.shape		,     __A   )

												_A								= torch.tensor([-1.0_266, 0.1_912, -1.2_861]   ).to(__A   )

												self.assertTrue(torch.allclose(outputs.logits[0, :3]		,     __A		,     atol=1e-4   )   )



							@slow
							@require_accelerate
							@require_torch_gpu
							def       __A (  self:   Optional[int]   )    ->				List[Any]:
												_A								= DeiTModel.from_pretrained(
												    '''facebook/deit-base-distilled-patch16-224'''		,     torch_dtype=torch.floataa		,     device_map='''auto'''   )
												_A								= self.default_image_processor

												_A								= prepare_img()
												_A								= image_processor(images=__A		,     return_tensors='''pt'''   )
												_A								= inputs.pixel_values.to(__A   )

												# forward pass to make sure inference works in fp16
												with torch.no_grad():
																	_A								= model(__A   )











import gc
import unittest

from transformers import CTRLConfig, is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...generation.test_utils import GenerationTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
				import torch

				from transformers import (
				    CTRL_PRETRAINED_MODEL_ARCHIVE_LIST,
				    CTRLForSequenceClassification,
				    CTRLLMHeadModel,
				    CTRLModel,
				)





class 						SCREAMING_SNAKE_CASE				:





							"""simple docstring"""

							def __init__(  self:   Tuple		,     __A:   Any		,     __A:   List[Any]=14		,     __A:   Dict=7		,     __A:   List[str]=True		,     __A:   Tuple=True		,     __A:   Union[str, Any]=True		,     __A:   List[Any]=True		,     __A:   Optional[int]=True		,     __A:   Tuple=99		,     __A:   Optional[Any]=32		,     __A:   List[str]=5		,     __A:   Dict=4		,     __A:   str=37		,     __A:   Dict="gelu"		,     __A:   List[str]=0.1		,     __A:   str=0.1		,     __A:   Any=5_12		,     __A:   Union[str, Any]=16		,     __A:   List[Any]=2		,     __A:   Tuple=0.02		,     __A:   Tuple=3		,     __A:   Union[str, Any]=4		,     __A:   Any=None		,     )    ->				Optional[Any]:
												_A								= parent
												_A								= batch_size
												_A								= seq_length
												_A								= is_training
												_A								= use_token_type_ids
												_A								= use_input_mask
												_A								= use_labels
												_A								= use_mc_token_ids
												_A								= vocab_size
												_A								= hidden_size
												_A								= num_hidden_layers
												_A								= num_attention_heads
												_A								= intermediate_size
												_A								= hidden_act
												_A								= hidden_dropout_prob
												_A								= attention_probs_dropout_prob
												_A								= max_position_embeddings
												_A								= type_vocab_size
												_A								= type_sequence_label_size
												_A								= initializer_range
												_A								= num_labels
												_A								= num_choices
												_A								= scope
												_A								= self.vocab_size - 1

							def       __A (  self:   Optional[int]   )    ->				Union[str, Any]:
												_A								= ids_tensor([self.batch_size, self.seq_length]		,     self.vocab_size   )

												_A								= None
												if self.use_input_mask:
																	_A								= random_attention_mask([self.batch_size, self.seq_length]   )

												_A								= None
												if self.use_token_type_ids:
																	_A								= ids_tensor([self.batch_size, self.seq_length]		,     self.type_vocab_size   )

												_A								= None
												if self.use_mc_token_ids:
																	_A								= ids_tensor([self.batch_size, self.num_choices]		,     self.seq_length   )

												_A								= None
												_A								= None
												_A								= None
												if self.use_labels:
																	_A								= ids_tensor([self.batch_size]		,     self.type_sequence_label_size   )
																	_A								= ids_tensor([self.batch_size, self.seq_length]		,     self.num_labels   )
																	_A								= ids_tensor([self.batch_size]		,     self.num_choices   )

												_A								= self.get_config()

												_A								= ids_tensor([self.num_hidden_layers, self.num_attention_heads]		,     2   )

												return (
												    config,
												    input_ids,
												    input_mask,
												    head_mask,
												    token_type_ids,
												    mc_token_ids,
												    sequence_labels,
												    token_labels,
												    choice_labels,
												)

							def       __A (  self:   Optional[int]   )    ->				List[Any]:
												return CTRLConfig(
												    vocab_size=self.vocab_size		,     n_embd=self.hidden_size		,     n_layer=self.num_hidden_layers		,     n_head=self.num_attention_heads		,     n_positions=self.max_position_embeddings		,     pad_token_id=self.pad_token_id		,     )

							def       __A (  self:   Union[str, Any]		,     __A:   Union[str, Any]		,     __A:   Dict		,     __A:   Optional[int]		,     __A:   List[str]		,     __A:   List[str]		,     *__A:   Optional[int]   )    ->				Optional[Any]:
												_A								= CTRLModel(config=__A   )
												model.to(__A   )
												model.eval()

												model(__A		,     token_type_ids=__A		,     head_mask=__A   )
												model(__A		,     token_type_ids=__A   )
												_A								= model(__A   )
												self.parent.assertEqual(result.last_hidden_state.shape		,     (self.batch_size, self.seq_length, self.hidden_size)   )
												self.parent.assertEqual(len(result.past_key_values   )		,     config.n_layer   )

							def       __A (  self:   Optional[Any]		,     __A:   List[str]		,     __A:   Dict		,     __A:   List[Any]		,     __A:   List[Any]		,     __A:   Any		,     *__A:   Any   )    ->				str:
												_A								= CTRLLMHeadModel(__A   )
												model.to(__A   )
												model.eval()

												_A								= model(__A		,     token_type_ids=__A		,     labels=__A   )
												self.parent.assertEqual(result.loss.shape		,     ()   )
												self.parent.assertEqual(result.logits.shape		,     (self.batch_size, self.seq_length, self.vocab_size)   )

							def       __A (  self:   Optional[int]   )    ->				Dict:
												_A								= self.prepare_config_and_inputs()

												(
												    (
												    _A
												)							,(
												    _A
												)							,(
												    _A
												)							,(
												    _A
												)							,(
												    _A
												)							,(
												    _A
												)							,(
												    _A
												)							,(
												    _A
												)							,(
												    _A
												)							,
												)								= config_and_inputs

												_A								= {'''input_ids''': input_ids, '''token_type_ids''': token_type_ids, '''head_mask''': head_mask}

												return config, inputs_dict



							def       __A (  self:   List[str]		,     __A:   Dict		,     __A:   Dict		,     __A:   Tuple		,     __A:   List[Any]		,     *__A:   Optional[int]   )    ->				Any:
												_A								= self.num_labels
												_A								= CTRLForSequenceClassification(__A   )
												model.to(__A   )
												model.eval()
												_A								= ids_tensor([self.batch_size]		,     self.type_sequence_label_size   )
												_A								= model(__A		,     token_type_ids=__A		,     labels=__A   )
												self.parent.assertEqual(result.logits.shape		,     (self.batch_size, self.num_labels)   )





@require_torch
class 						SCREAMING_SNAKE_CASE				( snake_case  ,	snake_case  ,	snake_case  ,	unittest.TestCase					):





							"""simple docstring"""

							A_						  =					(CTRLModel, CTRLLMHeadModel, CTRLForSequenceClassification) if is_torch_available() else ()
							A_						  =					(CTRLLMHeadModel,) if is_torch_available() else ()
							A_						  =					(
							    {
							        "feature-extraction": CTRLModel,
							        "text-classification": CTRLForSequenceClassification,
							        "text-generation": CTRLLMHeadModel,
							        "zero-shot": CTRLForSequenceClassification,
							    }
							    if is_torch_available()
							    else {}
							)
							A_						  =					True
							A_						  =					False
							A_						  =					False

							def       __A (  self:   Any		,     __A:   List[Any]		,     __A:   int		,     __A:   Optional[Any]		,     __A:   Optional[int]		,     __A:   List[Any]   )    ->				List[str]:
												if pipeline_test_casse_name == "ZeroShotClassificationPipelineTests":
																	# Get `tokenizer does not have a padding token` error for both fast/slow tokenizers.
																	# `CTRLConfig` was never used in pipeline tests, either because of a missing checkpoint or because a tiny
																	# config could not be created.
																	return True

												return False

							def       __A (  self:   Any   )    ->				Union[str, Any]:
												_A								= CTRLModelTester(self   )
												_A								= ConfigTester(self		,     config_class=__A		,     n_embd=37   )

							def       __A (  self:   Optional[int]   )    ->				List[Any]:
												super().tearDown()
												# clean-up as much as possible GPU memory occupied by PyTorch
												gc.collect()
												torch.cuda.empty_cache()

							def       __A (  self:   Dict   )    ->				Any:
												self.config_tester.run_common_tests()

							def       __A (  self:   str   )    ->				Optional[Any]:
												_A								= self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_ctrl_model(*__A   )

							def       __A (  self:   List[str]   )    ->				Any:
												_A								= self.model_tester.prepare_config_and_inputs()
												self.model_tester.create_and_check_lm_head_model(*__A   )

							@unittest.skip('''Will be fixed soon by reducing the size of the model used for common tests.'''   )
							def       __A (  self:   Optional[Any]   )    ->				int:
												pass

							@slow
							def       __A (  self:   Tuple   )    ->				Dict:
												for model_name in CTRL_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
																	_A								= CTRLModel.from_pretrained(__A   )
																	self.assertIsNotNone(__A   )



							@unittest.skip('''The model doesn\'t support left padding'''   )  # and it's not used enough to be worth fixing :)
							def       __A (  self:   Any   )    ->				Union[str, Any]:
												pass





@require_torch
class 						SCREAMING_SNAKE_CASE				( unittest.TestCase					):





							"""simple docstring"""

							def       __A (  self:   int   )    ->				Union[str, Any]:
												super().tearDown()
												# clean-up as much as possible GPU memory occupied by PyTorch
												gc.collect()
												torch.cuda.empty_cache()



							@slow
							def       __A (  self:   Any   )    ->				Any:
												_A								= CTRLLMHeadModel.from_pretrained('''ctrl'''   )
												model.to(__A   )
												_A								= torch.tensor(
												    [[1_18_59, 0, 16_11, 8]]		,     dtype=torch.long		,     device=__A   )  # Legal the president is
												_A								= [
												    1_18_59,
												    0,
												    16_11,
												    8,
												    5,
												    1_50,
												    2_64_49,
												    2,
												    19,
												    3_48,
												    4_69,
												    3,
												    25_95,
												    48,
												    2_07_40,
												    24_65_33,
												    24_65_33,
												    19,
												    30,
												    5,
												]  # Legal the president is a good guy and I don't want to lose my job. \n \n I have a

												_A								= model.generate(__A		,     do_sample=__A   )
												self.assertListEqual(output_ids[0].tolist()		,     __A   )



