



'''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      _lowerCAmelCase							(      unittest.TestCase			):


	@slow
	def    _a     (self							):
				for model_name in ["bert-base-cased", "bert-large-uncased"]:
							with self.subTest(lowercase							):
										A_     :						Union[str, Any]     =					AutoConfig.from_pretrained(lowercase							)
										self.assertIsNotNone(lowercase							)
										self.assertIsInstance(lowercase	,				lowercase							)

										A_     :						List[str]     =					FlaxAutoModel.from_pretrained(lowercase							)
										self.assertIsNotNone(lowercase							)
										self.assertIsInstance(lowercase	,				lowercase							)


	@slow
	def    _a     (self							):
				for model_name in ["roberta-base", "roberta-large"]:
							with self.subTest(lowercase							):
										A_     :						Optional[Any]     =					AutoConfig.from_pretrained(lowercase							)
										self.assertIsNotNone(lowercase							)
										self.assertIsInstance(lowercase	,				lowercase							)

										A_     :						str     =					FlaxAutoModel.from_pretrained(lowercase							)
										self.assertIsNotNone(lowercase							)
										self.assertIsInstance(lowercase	,				lowercase							)


	@slow
	def    _a     (self							):
				for model_name in ["bert-base-cased", "bert-large-uncased"]:
							A_     :						Optional[int]     =					AutoTokenizer.from_pretrained(lowercase							)
							A_     :						Any     =					FlaxBertModel.from_pretrained(lowercase							)
							A_     :						str     =					tokenizer("""Do you support jax jitted function?"""	,				return_tensors=TensorType.JAX							)

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

							eval(**lowercase							).block_until_ready()


	@slow
	def    _a     (self							):
				for model_name in ["roberta-base", "roberta-large"]:
							A_     :						str     =					AutoTokenizer.from_pretrained(lowercase							)
							A_     :						Any     =					FlaxRobertaModel.from_pretrained(lowercase							)
							A_     :						Dict     =					tokenizer("""Do you support jax jitted function?"""	,				return_tensors=TensorType.JAX							)

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

							eval(**lowercase							).block_until_ready()


	def    _a     (self							):
				with self.assertRaisesRegex(
				    lowercase	,				"""bert-base is not a local folder and is not a valid model identifier"""							):
							A_     :						Optional[int]     =					FlaxAutoModel.from_pretrained("""bert-base"""							)


	def    _a     (self							):
				with self.assertRaisesRegex(
				    lowercase	,				R"""aaaaaa is not a valid git identifier \(branch name, tag name or commit id\)"""							):
							A_     :						str     =					FlaxAutoModel.from_pretrained(lowercase	,				revision="""aaaaaa"""							)


	def    _a     (self							):
				with self.assertRaisesRegex(
				    lowercase	,				"""hf-internal-testing/config-no-model does not appear to have a file named flax_model.msgpack"""	,				):
							A_     :						List[str]     =					FlaxAutoModel.from_pretrained("""hf-internal-testing/config-no-model"""							)


	def    _a     (self							):
				with self.assertRaisesRegex(lowercase	,				"""Use `from_pt=True` to load this model"""							):
							A_     :						Optional[Any]     =					FlaxAutoModel.from_pretrained("""hf-internal-testing/tiny-bert-pt-only"""							)




'''simple docstring'''




def      a      (			):
			'''simple docstring'''





			A_     :						Optional[int]     =					[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

			A_     :						Dict     =					6
			A_     :						List[Any]     =					1
			A_     :						Optional[Any]     =					19_01

			A_     :						Tuple     =					0

			while year < 20_01:
						day += 7

						if (year % 4 == 0 and year % 1_00 != 0) or (year % 4_00 == 0):
									if day > days_per_month[month - 1] and month != 2:
												month += 1
												A_     :						Optional[Any]     =					day - days_per_month[month - 2]
									elif day > 29 and month == 2:
												month += 1
												A_     :						str     =					day - 29
						else:
									if day > days_per_month[month - 1]:
												month += 1
												A_     :						List[str]     =					day - days_per_month[month - 2]

						if month > 12:
									year += 1
									A_     :						Tuple     =					1

						if year < 20_01 and day == 1:
									sundays += 1
			return sundays


if __name__ == "__main__":
						print(solution())