




import os
import sys
import unittest


lowerCamelCase__			:       Tuple         =							os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
sys.path.append(os.path.join(git_repo_path, 'utils'))

import get_test_info  # noqa: E402
from get_test_info import (  # noqa: E402
    get_model_to_test_mapping,
    get_model_to_tester_mapping,
    get_test_to_tester_mapping,
)


lowerCamelCase__			:       str         =							os.path.join('tests', 'models', 'bert', 'test_modeling_bert.py')
lowerCamelCase__			:       Optional[int]         =							os.path.join('tests', 'models', 'blip', 'test_modeling_blip.py')





class 	lowerCamelCase_							(				unittest.TestCase ):


	'''simple docstring'''







	def 				lowerCAmelCase_  (							self  :		Tuple						):
							SCREAMING_SNAKE_CASE_     						=      get_test_to_tester_mapping(_UpperCAmelCase						)
							SCREAMING_SNAKE_CASE_     						=      get_test_to_tester_mapping(_UpperCAmelCase						)

							SCREAMING_SNAKE_CASE_     						=      {'''BertModelTest''': '''BertModelTester'''}

							SCREAMING_SNAKE_CASE_     						=      {
							    '''BlipModelTest''': '''BlipModelTester''',
							    '''BlipTextImageModelTest''': '''BlipTextImageModelsModelTester''',
							    '''BlipTextModelTest''': '''BlipTextModelTester''',
							    '''BlipTextRetrievalModelTest''': '''BlipTextRetrievalModelTester''',
							    '''BlipVQAModelTest''': '''BlipVQAModelTester''',
							    '''BlipVisionModelTest''': '''BlipVisionModelTester''',
							}

							self.assertEqual(get_test_info.to_json(_UpperCAmelCase						)    ,    _UpperCAmelCase						)
							self.assertEqual(get_test_info.to_json(_UpperCAmelCase						)    ,    _UpperCAmelCase						)



	def 				lowerCAmelCase_  (							self  :		Any						):
							SCREAMING_SNAKE_CASE_     						=      get_model_to_test_mapping(_UpperCAmelCase						)
							SCREAMING_SNAKE_CASE_     						=      get_model_to_test_mapping(_UpperCAmelCase						)

							SCREAMING_SNAKE_CASE_     						=      {
							    '''BertForMaskedLM''': ['''BertModelTest'''],
							    '''BertForMultipleChoice''': ['''BertModelTest'''],
							    '''BertForNextSentencePrediction''': ['''BertModelTest'''],
							    '''BertForPreTraining''': ['''BertModelTest'''],
							    '''BertForQuestionAnswering''': ['''BertModelTest'''],
							    '''BertForSequenceClassification''': ['''BertModelTest'''],
							    '''BertForTokenClassification''': ['''BertModelTest'''],
							    '''BertLMHeadModel''': ['''BertModelTest'''],
							    '''BertModel''': ['''BertModelTest'''],
							}

							SCREAMING_SNAKE_CASE_     						=      {
							    '''BlipForConditionalGeneration''': ['''BlipTextImageModelTest'''],
							    '''BlipForImageTextRetrieval''': ['''BlipTextRetrievalModelTest'''],
							    '''BlipForQuestionAnswering''': ['''BlipVQAModelTest'''],
							    '''BlipModel''': ['''BlipModelTest'''],
							    '''BlipTextModel''': ['''BlipTextModelTest'''],
							    '''BlipVisionModel''': ['''BlipVisionModelTest'''],
							}

							self.assertEqual(get_test_info.to_json(_UpperCAmelCase						)    ,    _UpperCAmelCase						)
							self.assertEqual(get_test_info.to_json(_UpperCAmelCase						)    ,    _UpperCAmelCase						)




	def 				lowerCAmelCase_  (							self  :		List[str]						):
							SCREAMING_SNAKE_CASE_     						=      get_model_to_tester_mapping(_UpperCAmelCase						)
							SCREAMING_SNAKE_CASE_     						=      get_model_to_tester_mapping(_UpperCAmelCase						)

							SCREAMING_SNAKE_CASE_     						=      {
							    '''BertForMaskedLM''': ['''BertModelTester'''],
							    '''BertForMultipleChoice''': ['''BertModelTester'''],
							    '''BertForNextSentencePrediction''': ['''BertModelTester'''],
							    '''BertForPreTraining''': ['''BertModelTester'''],
							    '''BertForQuestionAnswering''': ['''BertModelTester'''],
							    '''BertForSequenceClassification''': ['''BertModelTester'''],
							    '''BertForTokenClassification''': ['''BertModelTester'''],
							    '''BertLMHeadModel''': ['''BertModelTester'''],
							    '''BertModel''': ['''BertModelTester'''],
							}

							SCREAMING_SNAKE_CASE_     						=      {
							    '''BlipForConditionalGeneration''': ['''BlipTextImageModelsModelTester'''],
							    '''BlipForImageTextRetrieval''': ['''BlipTextRetrievalModelTester'''],
							    '''BlipForQuestionAnswering''': ['''BlipVQAModelTester'''],
							    '''BlipModel''': ['''BlipModelTester'''],
							    '''BlipTextModel''': ['''BlipTextModelTester'''],
							    '''BlipVisionModel''': ['''BlipVisionModelTester'''],
							}

							self.assertEqual(get_test_info.to_json(_UpperCAmelCase						)    ,    _UpperCAmelCase						)
							self.assertEqual(get_test_info.to_json(_UpperCAmelCase						)    ,    _UpperCAmelCase						)





def  UpperCAmelCase_							(				__UpperCAmelCase						:     int      ,      __UpperCAmelCase						:     int							) ->			int:
      return int((input_a, input_a).count(0							) != 0							)

def  UpperCAmelCase_							(				) ->			None:
      assert nand_gate(0      ,      0							) == 1
      assert nand_gate(0      ,      1							) == 1
      assert nand_gate(1      ,      0							) == 1
      assert nand_gate(1      ,      1							) == 0


if __name__ == "__main__":
   print(nand_gate(0, 0))
   print(nand_gate(0, 1))
   print(nand_gate(1, 0))
   print(nand_gate(1, 1))