





'''simple docstring'''


import os
import sys
import unittest


lowerCAmelCase :					str 							=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 :					Optional[int] 							=os.path.join('''tests''', '''models''', '''bert''', '''test_modeling_bert.py''')
lowerCAmelCase :					Dict 							=os.path.join('''tests''', '''models''', '''blip''', '''test_modeling_blip.py''')
class 				a_       (    unittest.TestCase							):





     def 							lowercase__				(			self		: Optional[Any]						):





        """simple docstring"""




        lowercase_      :str         =			get_test_to_tester_mapping(SCREAMING_SNAKE_CASE_						)
        lowercase_      :Union[str, Any]         =			get_test_to_tester_mapping(SCREAMING_SNAKE_CASE_						)

        lowercase_      :Union[str, Any]         =			{"""BertModelTest""": """BertModelTester"""}

        lowercase_      :str         =			{
            """BlipModelTest""": """BlipModelTester""",
            """BlipTextImageModelTest""": """BlipTextImageModelsModelTester""",
            """BlipTextModelTest""": """BlipTextModelTester""",
            """BlipTextRetrievalModelTest""": """BlipTextRetrievalModelTester""",
            """BlipVQAModelTest""": """BlipVQAModelTester""",
            """BlipVisionModelTest""": """BlipVisionModelTester""",
        }

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





     def 							lowercase__				(			self		: str						):





        """simple docstring"""




        lowercase_      :List[str]         =			get_model_to_test_mapping(SCREAMING_SNAKE_CASE_						)
        lowercase_      :List[str]         =			get_model_to_test_mapping(SCREAMING_SNAKE_CASE_						)

        lowercase_      :Union[str, Any]         =			{
            """BertForMaskedLM""": ["""BertModelTest"""],
            """BertForMultipleChoice""": ["""BertModelTest"""],
            """BertForNextSentencePrediction""": ["""BertModelTest"""],
            """BertForPreTraining""": ["""BertModelTest"""],
            """BertForQuestionAnswering""": ["""BertModelTest"""],
            """BertForSequenceClassification""": ["""BertModelTest"""],
            """BertForTokenClassification""": ["""BertModelTest"""],
            """BertLMHeadModel""": ["""BertModelTest"""],
            """BertModel""": ["""BertModelTest"""],
        }

        lowercase_      :int         =			{
            """BlipForConditionalGeneration""": ["""BlipTextImageModelTest"""],
            """BlipForImageTextRetrieval""": ["""BlipTextRetrievalModelTest"""],
            """BlipForQuestionAnswering""": ["""BlipVQAModelTest"""],
            """BlipModel""": ["""BlipModelTest"""],
            """BlipTextModel""": ["""BlipTextModelTest"""],
            """BlipVisionModel""": ["""BlipVisionModelTest"""],
        }

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







     def 							lowercase__				(			self		: str						):





        """simple docstring"""




        lowercase_      :Any         =			get_model_to_tester_mapping(SCREAMING_SNAKE_CASE_						)
        lowercase_      :Optional[int]         =			get_model_to_tester_mapping(SCREAMING_SNAKE_CASE_						)

        lowercase_      :Optional[int]         =			{
            """BertForMaskedLM""": ["""BertModelTester"""],
            """BertForMultipleChoice""": ["""BertModelTester"""],
            """BertForNextSentencePrediction""": ["""BertModelTester"""],
            """BertForPreTraining""": ["""BertModelTester"""],
            """BertForQuestionAnswering""": ["""BertModelTester"""],
            """BertForSequenceClassification""": ["""BertModelTester"""],
            """BertForTokenClassification""": ["""BertModelTester"""],
            """BertLMHeadModel""": ["""BertModelTester"""],
            """BertModel""": ["""BertModelTester"""],
        }

        lowercase_      :Union[str, Any]         =			{
            """BlipForConditionalGeneration""": ["""BlipTextImageModelsModelTester"""],
            """BlipForImageTextRetrieval""": ["""BlipTextRetrievalModelTester"""],
            """BlipForQuestionAnswering""": ["""BlipVQAModelTester"""],
            """BlipModel""": ["""BlipModelTester"""],
            """BlipTextModel""": ["""BlipTextModelTester"""],
            """BlipVisionModel""": ["""BlipVisionModelTester"""],
        }

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









'''simple docstring'''


import numpy as np
def 							UpperCAmelCase_  (						__lowerCamelCase : str     ,__lowerCamelCase : Optional[Any]     ,__lowerCamelCase : int     ,__lowerCamelCase : List[str]     ,__lowerCamelCase : List[Any]			):
   lowercase_      :Dict         =			int(np.ceil((x_end - xa) / h			)			)
   lowercase_      :Optional[int]         =			np.zeros((n + 1,)			)
   lowercase_      :Tuple         =			ya
   lowercase_      :List[str]         =			xa

   for k in range(__lowerCamelCase			):
      lowercase_      :Any         =			f(__lowerCamelCase     ,y[k]			)
      lowercase_      :Optional[Any]         =			f(x + 0.5 * h     ,y[k] + 0.5 * h * ka			)
      lowercase_      :Optional[Any]         =			f(x + 0.5 * h     ,y[k] + 0.5 * h * ka			)
      lowercase_      :Any         =			f(x + h     ,y[k] + h * ka			)
      lowercase_      :Tuple         =			y[k] + (1 / 6) * h * (ka + 2 * ka + 2 * ka + ka)
      x += h

   return y


if __name__ == "__main__":
 import doctest

 doctest.testmod()


