


"""simple docstring"""







import unittest

from transformers import AutoConfig, AutoTokenizer, BertConfig, TensorType, is_flax_available
from transformers.testing_utils import DUMMY_UNKNOWN_IDENTIFIER, require_flax, slow


if is_flax_available():
       import jax

       from transformers.models.auto.modeling_flax_auto import FlaxAutoModel
       from transformers.models.bert.modeling_flax_bert import FlaxBertModel
       from transformers.models.roberta.modeling_flax_roberta import FlaxRobertaModel






@require_flax
class       __A				(       unittest.TestCase			):






 """simple docstring"""




 @slow
 def       SCREAMING_SNAKE_CASE							(		self						)					->     List[str]:
     for model_name in ["bert-base-cased", "bert-large-uncased"]:
         with self.subTest(__A						):
             a 		=AutoConfig.from_pretrained(__A						)
             self.assertIsNotNone(__A						)
             self.assertIsInstance(__A ,    __A						)

             a 		=FlaxAutoModel.from_pretrained(__A						)
             self.assertIsNotNone(__A						)
             self.assertIsInstance(__A ,    __A						)


 @slow
 def       SCREAMING_SNAKE_CASE							(		self						)					->     int:
     for model_name in ["roberta-base", "roberta-large"]:
         with self.subTest(__A						):
             a 		=AutoConfig.from_pretrained(__A						)
             self.assertIsNotNone(__A						)
             self.assertIsInstance(__A ,    __A						)

             a 		=FlaxAutoModel.from_pretrained(__A						)
             self.assertIsNotNone(__A						)
             self.assertIsInstance(__A ,    __A						)


 @slow
 def       SCREAMING_SNAKE_CASE							(		self						)					->     Any:
     for model_name in ["bert-base-cased", "bert-large-uncased"]:
         a 		=AutoTokenizer.from_pretrained(__A						)
         a 		=FlaxBertModel.from_pretrained(__A						)
         a 		=tokenizer('''Do you support jax jitted function?''' ,    return_tensors=TensorType.JAX						)

         @jax.jit
         def eval(**__A						):
             return model(**__A						)

         eval(**__A						).block_until_ready()


 @slow
 def       SCREAMING_SNAKE_CASE							(		self						)					->     Optional[Any]:
     for model_name in ["roberta-base", "roberta-large"]:
         a 		=AutoTokenizer.from_pretrained(__A						)
         a 		=FlaxRobertaModel.from_pretrained(__A						)
         a 		=tokenizer('''Do you support jax jitted function?''' ,    return_tensors=TensorType.JAX						)

         @jax.jit
         def eval(**__A						):
             return model(**__A						)

         eval(**__A						).block_until_ready()


 def       SCREAMING_SNAKE_CASE							(		self						)					->     List[Any]:
     with self.assertRaisesRegex(
         __A ,    '''bert-base is not a local folder and is not a valid model identifier'''						):
         a 		=FlaxAutoModel.from_pretrained('''bert-base'''						)


 def       SCREAMING_SNAKE_CASE							(		self						)					->     Any:
     with self.assertRaisesRegex(
         __A ,    r'''aaaaaa is not a valid git identifier \(branch name, tag name or commit id\)'''						):
         a 		=FlaxAutoModel.from_pretrained(__A ,    revision='''aaaaaa'''						)


 def       SCREAMING_SNAKE_CASE							(		self						)					->     Optional[int]:
     with self.assertRaisesRegex(
         __A ,    '''hf-internal-testing/config-no-model does not appear to have a file named flax_model.msgpack''' ,    ):
         a 		=FlaxAutoModel.from_pretrained('''hf-internal-testing/config-no-model'''						)





 def       SCREAMING_SNAKE_CASE							(		self						)					->     Any:
     with self.assertRaisesRegex(__A ,    '''Use `from_pt=True` to load this model'''						):
         a 		=FlaxAutoModel.from_pretrained('''hf-internal-testing/tiny-bert-pt-only'''						)

from __future__ import annotations




def    __UpperCamelCase     (				lowerCAmelCase__							:				list[float]  ,   lowerCAmelCase__							:				list[float]  ):
 __a :  Dict						=  sorted(numsa + numsa  )
 __a				,       __a :  Optional[Any]						=  divmod(len(lowerCAmelCase__  )  ,   2  )
 if mod == 1:
  return all_numbers[div]
 else:
  return (all_numbers[div] + all_numbers[div - 1]) / 2


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      lowercase__       =[float(x) for x in input('Enter the elements of first array: ').split()]
      lowercase__       =[float(x) for x in input('Enter the elements of second array: ').split()]
      print(F"""The median of two arrays is: {median_of_two_arrays(array_a, array_a)}""")
