"""simple docstring"""




import tempfile
import unittest

import transformers
from transformers import XGLMConfig, XGLMTokenizer, is_flax_available, is_torch_available
from transformers.testing_utils import is_pt_flax_cross_test, require_flax, require_sentencepiece, slow

from ...generation.test_flax_utils import FlaxGenerationTesterMixin
from ...test_modeling_flax_common import FlaxModelTesterMixin, floats_tensor, ids_tensor, random_attention_mask


if is_flax_available():
				import jax
				import jax.numpy as jnp
				import numpy as np

				from transformers.modeling_flax_pytorch_utils import (
				    convert_pytorch_state_dict_to_flax,
				    load_flax_weights_in_pytorch_model,
				)
				from transformers.models.xglm.modeling_flax_xglm import FlaxXGLMForCausalLM, FlaxXGLMModel


if is_torch_available():
				import torch
@require_flax
class      UpperCamelCase__:





						def __init__(							self		,__UpperCAmelCase		,__UpperCAmelCase=14		,__UpperCAmelCase=7		,__UpperCAmelCase=True		,__UpperCAmelCase=True		,__UpperCAmelCase=True		,__UpperCAmelCase=99		,__UpperCAmelCase=32		,__UpperCAmelCase=5		,__UpperCAmelCase=4		,__UpperCAmelCase=37		,__UpperCAmelCase="gelu"		,__UpperCAmelCase=0.1		,__UpperCAmelCase=0.1		,__UpperCAmelCase=5_12		,__UpperCAmelCase=0.0_2		,__UpperCAmelCase=None		,)       ->					int:
													A__						  =				parent
													A__						  =				batch_size
													A__						  =				seq_length
													A__						  =				is_training
													A__						  =				use_input_mask
													A__						  =				use_labels
													A__						  =				vocab_size
													A__						  =				d_model
													A__						  =				num_hidden_layers
													A__						  =				num_attention_heads
													A__						  =				ffn_dim
													A__						  =				activation_function
													A__						  =				activation_dropout
													A__						  =				attention_dropout
													A__						  =				max_position_embeddings
													A__						  =				initializer_range
													A__						  =				None
													A__						  =				0
													A__						  =				2
													A__						  =				1





						def 					snake_case__						(							self  )       ->					Optional[int]:
													A__						  =				np.clip(ids_tensor([self.batch_size, self.seq_length]		,self.vocab_size  )		,3		,self.vocab_size  )

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

													A__						  =				XGLMConfig(
													    vocab_size=self.vocab_size		,d_model=self.hidden_size		,num_layers=self.num_hidden_layers		,attention_heads=self.num_attention_heads		,ffn_dim=self.ffn_dim		,activation_function=self.activation_function		,activation_dropout=self.activation_dropout		,attention_dropout=self.attention_dropout		,max_position_embeddings=self.max_position_embeddings		,initializer_range=self.initializer_range		,use_cache=__UpperCAmelCase		,bos_token_id=self.bos_token_id		,eos_token_id=self.eos_token_id		,pad_token_id=self.pad_token_id		,)

													return (config, input_ids, input_mask)





						def 					snake_case__						(							self  )       ->					str:
													A__						  =				self.prepare_config_and_inputs()
													A__  ,	A__  ,	A__						  =				config_and_inputs
													A__						  =				{'input_ids': input_ids, 'attention_mask': attention_mask}
													return config, inputs_dict





						def 					snake_case__						(							self  )       ->					Dict:
													A__  ,	A__  ,	A__						  =				self.prepare_config_and_inputs()

													A__						  =				floats_tensor([self.batch_size, self.seq_length, self.hidden_size]  )
													A__						  =				ids_tensor([self.batch_size, self.seq_length]		,vocab_size=2  )

													return (
													    config,
													    input_ids,
													    attention_mask,
													    encoder_hidden_states,
													    encoder_attention_mask,
													)





						def 					snake_case__						(							self		,__UpperCAmelCase		,__UpperCAmelCase		,__UpperCAmelCase		,__UpperCAmelCase  )       ->					Optional[int]:
													A__						  =				20
													A__						  =				model_class_name(__UpperCAmelCase  )

													A__						  =				model.init_cache(input_ids.shape[0]		,__UpperCAmelCase  )
													A__						  =				jnp.ones((input_ids.shape[0], max_decoder_length)		,dtype='i4'  )

													A__						  =				jnp.broadcast_to(
													    jnp.arange(input_ids.shape[-1] - 1  )[None, :]		,(input_ids.shape[0], input_ids.shape[-1] - 1)  )
													A__						  =				model(
													    input_ids[:, :-1]		,attention_mask=__UpperCAmelCase		,past_key_values=__UpperCAmelCase		,position_ids=__UpperCAmelCase		,)

													A__						  =				jnp.array(input_ids.shape[0] * [[input_ids.shape[-1] - 1]]		,dtype='i4'  )
													A__						  =				model(
													    input_ids[:, -1:]		,attention_mask=__UpperCAmelCase		,past_key_values=outputs_cache.past_key_values		,position_ids=__UpperCAmelCase		,)

													A__						  =				model(__UpperCAmelCase  )

													A__						  =				np.max(np.abs((outputs_cache_next[0][:, -1, :5] - outputs[0][:, -1, :5])  )  )
													self.parent.assertTrue(diff < 1e-3		,msg=f'''Max diff is {diff}'''  )





						def 					snake_case__						(							self		,__UpperCAmelCase		,__UpperCAmelCase		,__UpperCAmelCase		,__UpperCAmelCase  )       ->					Any:
													A__						  =				20
													A__						  =				model_class_name(__UpperCAmelCase  )

													A__						  =				jnp.concatenate(
													    [attention_mask, jnp.zeros((attention_mask.shape[0], max_decoder_length - attention_mask.shape[1])  )]		,axis=-1		,)

													A__						  =				model.init_cache(input_ids.shape[0]		,__UpperCAmelCase  )
													A__						  =				jnp.broadcast_to(
													    jnp.arange(input_ids.shape[-1] - 1  )[None, :]		,(input_ids.shape[0], input_ids.shape[-1] - 1)  )

													A__						  =				model(
													    input_ids[:, :-1]		,attention_mask=__UpperCAmelCase		,past_key_values=__UpperCAmelCase		,position_ids=__UpperCAmelCase		,)
													A__						  =				jnp.array(input_ids.shape[0] * [[input_ids.shape[-1] - 1]]		,dtype='i4'  )
													A__						  =				model(
													    input_ids[:, -1:]		,past_key_values=outputs_cache.past_key_values		,attention_mask=__UpperCAmelCase		,position_ids=__UpperCAmelCase		,)

													A__						  =				model(__UpperCAmelCase		,attention_mask=__UpperCAmelCase  )
													A__						  =				np.max(np.abs((outputs_cache_next[0][:, -1, :5] - outputs[0][:, -1, :5])  )  )
													self.parent.assertTrue(diff < 1e-3		,msg=f'''Max diff is {diff}'''  )






@require_sentencepiece
@require_flax
class      UpperCamelCase__(      __A		,    __A		,    unittest.TestCase			):
						lowerCAmelCase__	:    str    				=		(FlaxXGLMModel, FlaxXGLMForCausalLM) if is_flax_available() else ()
						lowerCAmelCase__	:    Tuple    				=		(FlaxXGLMForCausalLM,) if is_flax_available() else ()





						def 					snake_case__						(							self  )       ->					Any:
													A__						  =				FlaxXGLMModelTester(self  )





						def 					snake_case__						(							self  )       ->					Any:
													for model_class_name in self.all_model_classes:
																				A__  ,	A__  ,	A__						  =				self.model_tester.prepare_config_and_inputs()
																				self.model_tester.check_use_cache_forward(__UpperCAmelCase		,__UpperCAmelCase		,__UpperCAmelCase		,__UpperCAmelCase  )





						def 					snake_case__						(							self  )       ->					Tuple:
													for model_class_name in self.all_model_classes:
																				A__  ,	A__  ,	A__						  =				self.model_tester.prepare_config_and_inputs()
																				self.model_tester.check_use_cache_forward_with_attn_mask(
																				    __UpperCAmelCase		,__UpperCAmelCase		,__UpperCAmelCase		,__UpperCAmelCase  )





						@slow
						def 					snake_case__						(							self  )       ->					List[str]:
													A__						  =				XGLMTokenizer.from_pretrained('XGLM'		,padding_side='left'  )
													A__						  =				tokenizer(['Hello this is a long string', 'Hey']		,return_tensors='np'		,padding=__UpperCAmelCase		,truncation=__UpperCAmelCase  )

													A__						  =				FlaxXGLMForCausalLM.from_pretrained('facebook/xglm-564M'  )
													A__						  =				1
													A__						  =				False

													A__						  =				jax.jit(model.generate  )

													A__						  =				jit_generate(inputs['input_ids']		,attention_mask=inputs['attention_mask']  ).sequences

													A__						  =				tokenizer.batch_decode(__UpperCAmelCase		,skip_special_tokens=__UpperCAmelCase  )

													A__						  =				[
													    'Hello this is a long string of questions, but I\'m not sure if I\'m',
													    'Hey, I\'m a newbie to the forum and I\'',
													]

													self.assertListEqual(__UpperCAmelCase		,__UpperCAmelCase  )





						@is_pt_flax_cross_test
						def 					snake_case__						(							self  )       ->					List[str]:
													A__  ,	A__						  =				self.model_tester.prepare_config_and_inputs_for_common()

													for model_class in self.all_model_classes:
																				with self.subTest(model_class.__name__  ):
																											# prepare inputs
																											A__						  =				self._prepare_for_class(__UpperCAmelCase		,__UpperCAmelCase  )
																											A__						  =				{k: torch.tensor(v.tolist()  ) for k, v in prepared_inputs_dict.items()}

																											# load corresponding PyTorch class
																											A__						  =				model_class.__name__[4:]  # Skip the "Flax" at the beginning
																											A__						  =				getattr(__UpperCAmelCase		,__UpperCAmelCase  )

																											A__  ,	A__						  =				pt_inputs['input_ids'].shape
																											A__						  =				np.random.randint(0		,seq_length - 1		,size=(batch_size,)  )
																											for batch_idx, start_index in enumerate(__UpperCAmelCase  ):
																																		A__						  =				0
																																		A__						  =				1
																																		A__						  =				0
																																		A__						  =				1
																											A__						  =				pt_model_class(__UpperCAmelCase  ).eval()
																											# Flax models don't use the `use_cache` option and cache is not returned as a default.
																											# So we disable `use_cache` here for PyTorch model.
																											A__						  =				False
																											A__						  =				model_class(__UpperCAmelCase		,dtype=jnp.floataa  )
																											A__						  =				convert_pytorch_state_dict_to_flax(pt_model.state_dict()		,__UpperCAmelCase  )
																											A__						  =				fx_state

																											with torch.no_grad():
																																		A__						  =				pt_model(**__UpperCAmelCase  ).to_tuple()

																											A__						  =				fx_model(**__UpperCAmelCase  ).to_tuple()
																											self.assertEqual(len(__UpperCAmelCase  )		,len(__UpperCAmelCase  )		,'Output lengths differ between Flax and PyTorch'  )
																											for fx_output, pt_output in zip(__UpperCAmelCase		,__UpperCAmelCase  ):
																																		self.assert_almost_equals(fx_output[:, -1]		,pt_output[:, -1].numpy()		,4e-2  )

																											with tempfile.TemporaryDirectory() as tmpdirname:
																																		pt_model.save_pretrained(__UpperCAmelCase  )
																																		A__						  =				model_class.from_pretrained(__UpperCAmelCase		,from_pt=__UpperCAmelCase  )

																											A__						  =				fx_model_loaded(**__UpperCAmelCase  ).to_tuple()
																											self.assertEqual(
																											    len(__UpperCAmelCase  )		,len(__UpperCAmelCase  )		,'Output lengths differ between Flax and PyTorch'  )
																											for fx_output_loaded, pt_output in zip(__UpperCAmelCase		,__UpperCAmelCase  ):
																																		self.assert_almost_equals(fx_output_loaded[:, -1]		,pt_output[:, -1].numpy()		,4e-2  )





						@is_pt_flax_cross_test
						def 					snake_case__						(							self  )       ->					Any:
													A__  ,	A__						  =				self.model_tester.prepare_config_and_inputs_for_common()
													for model_class in self.all_model_classes:
																				with self.subTest(model_class.__name__  ):
																											# prepare inputs
																											A__						  =				self._prepare_for_class(__UpperCAmelCase		,__UpperCAmelCase  )
																											A__						  =				{k: torch.tensor(v.tolist()  ) for k, v in prepared_inputs_dict.items()}

																											# load corresponding PyTorch class
																											A__						  =				model_class.__name__[4:]  # Skip the "Flax" at the beginning
																											A__						  =				getattr(__UpperCAmelCase		,__UpperCAmelCase  )

																											A__						  =				pt_model_class(__UpperCAmelCase  ).eval()
																											A__						  =				False
																											A__						  =				model_class(__UpperCAmelCase		,dtype=jnp.floataa  )

																											A__						  =				load_flax_weights_in_pytorch_model(__UpperCAmelCase		,fx_model.params  )
																											A__  ,	A__						  =				pt_inputs['input_ids'].shape
																											A__						  =				np.random.randint(0		,seq_length - 1		,size=(batch_size,)  )
																											for batch_idx, start_index in enumerate(__UpperCAmelCase  ):
																																		A__						  =				0
																																		A__						  =				1
																																		A__						  =				0
																																		A__						  =				1

																											# make sure weights are tied in PyTorch
																											pt_model.tie_weights()

																											with torch.no_grad():
																																		A__						  =				pt_model(**__UpperCAmelCase  ).to_tuple()

																											A__						  =				fx_model(**__UpperCAmelCase  ).to_tuple()
																											self.assertEqual(len(__UpperCAmelCase  )		,len(__UpperCAmelCase  )		,'Output lengths differ between Flax and PyTorch'  )
																											for fx_output, pt_output in zip(__UpperCAmelCase		,__UpperCAmelCase  ):
																																		self.assert_almost_equals(fx_output[:, -1]		,pt_output[:, -1].numpy()		,4e-2  )

																											with tempfile.TemporaryDirectory() as tmpdirname:
																																		fx_model.save_pretrained(__UpperCAmelCase  )
																																		A__						  =				pt_model_class.from_pretrained(__UpperCAmelCase		,from_flax=__UpperCAmelCase  )

																											with torch.no_grad():
																																		A__						  =				pt_model_loaded(**__UpperCAmelCase  ).to_tuple()

																											self.assertEqual(
																											    len(__UpperCAmelCase  )		,len(__UpperCAmelCase  )		,'Output lengths differ between Flax and PyTorch'  )
																											for fx_output, pt_output in zip(__UpperCAmelCase		,__UpperCAmelCase  ):
																																		self.assert_almost_equals(fx_output[:, -1]		,pt_output[:, -1].numpy()		,4e-2  )





						@slow
						def 					snake_case__						(							self  )       ->					Any:
													for model_class_name in self.all_model_classes:
																				A__						  =				model_class_name.from_pretrained('facebook/xglm-564M'  )
																				A__						  =				model(np.ones((1, 1)  )  )
																				self.assertIsNotNone(__UpperCAmelCase  )






"""simple docstring"""




import inspect
import unittest

from transformers import is_torch_available, is_vision_available
from transformers.models.auto import get_values
from transformers.testing_utils import require_torch, slow, torch_device

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 transformers import MODEL_MAPPING, PoolFormerConfig, PoolFormerForImageClassification, PoolFormerModel
				from transformers.models.poolformer.modeling_poolformer import POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST


if is_vision_available():
				from PIL import Image

				from transformers import PoolFormerImageProcessor
class      UpperCamelCase__(      __A			):





						def 					snake_case__						(							self  )       ->					int:
													A__						  =				self.config_class(**self.inputs_dict  )
													self.parent.assertTrue(hasattr(__UpperCAmelCase		,'hidden_sizes'  )  )
													self.parent.assertTrue(hasattr(__UpperCAmelCase		,'num_encoder_blocks'  )  )






class      UpperCamelCase__:





						def __init__(							self		,__UpperCAmelCase		,__UpperCAmelCase=13		,__UpperCAmelCase=64		,__UpperCAmelCase=3		,__UpperCAmelCase=4		,__UpperCAmelCase=[2, 2, 2, 2]		,__UpperCAmelCase=[8, 4, 2, 1]		,__UpperCAmelCase=[16, 32, 64, 1_28]		,__UpperCAmelCase=[1, 4, 8, 16]		,__UpperCAmelCase=False		,__UpperCAmelCase=True		,__UpperCAmelCase="gelu"		,__UpperCAmelCase=0.1		,__UpperCAmelCase=0.0_2		,__UpperCAmelCase=3		,__UpperCAmelCase=None		,)       ->					Tuple:
													A__						  =				parent
													A__						  =				batch_size
													A__						  =				image_size
													A__						  =				num_channels
													A__						  =				num_encoder_blocks
													A__						  =				sr_ratios
													A__						  =				depths
													A__						  =				hidden_sizes
													A__						  =				downsampling_rates
													A__						  =				is_training
													A__						  =				use_labels
													A__						  =				hidden_act
													A__						  =				hidden_dropout_prob
													A__						  =				initializer_range
													A__						  =				num_labels
													A__						  =				scope





						def 					snake_case__						(							self  )       ->					Tuple:
													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.image_size, self.image_size]		,self.num_labels  )

													A__						  =				PoolFormerConfig(
													    image_size=self.image_size		,num_channels=self.num_channels		,num_encoder_blocks=self.num_encoder_blocks		,depths=self.depths		,hidden_sizes=self.hidden_sizes		,hidden_act=self.hidden_act		,hidden_dropout_prob=self.hidden_dropout_prob		,initializer_range=self.initializer_range		,)

													return config, pixel_values, labels





						def 					snake_case__						(							self		,__UpperCAmelCase		,__UpperCAmelCase		,__UpperCAmelCase  )       ->					Union[str, Any]:
													A__						  =				PoolFormerModel(config=__UpperCAmelCase  )
													model.to(__UpperCAmelCase  )
													model.eval()
													A__						  =				model(__UpperCAmelCase  )
													A__						  =				A__						  =				self.image_size // 3_2.0
													self.parent.assertEqual(
													    result.last_hidden_state.shape		,(self.batch_size, self.hidden_sizes[-1], expected_height, expected_width)  )





						def 					snake_case__						(							self  )       ->					Any:
													A__						  =				self.prepare_config_and_inputs()
													A__  ,	A__  ,	A__						  =				config_and_inputs
													A__						  =				{'pixel_values': pixel_values}
													return config, inputs_dict






@require_torch
class      UpperCamelCase__(      __A		,    __A		,    unittest.TestCase			):
						lowerCAmelCase__	:    Optional[int]    				=		(PoolFormerModel, PoolFormerForImageClassification) if is_torch_available() else ()
						lowerCAmelCase__	:    Optional[Any]    				=		(
						    {'feature-extraction': PoolFormerModel, 'image-classification': PoolFormerForImageClassification}
						    if is_torch_available()
						    else {}
						)

						lowerCAmelCase__	:    Any    				=		False
						lowerCAmelCase__	:    str    				=		False
						lowerCAmelCase__	:    Any    				=		False
						lowerCAmelCase__	:    str    				=		False
						lowerCAmelCase__	:    Optional[int]    				=		False





						def 					snake_case__						(							self  )       ->					Any:
													A__						  =				PoolFormerModelTester(self  )
													A__						  =				PoolFormerConfigTester(self		,config_class=__UpperCAmelCase  )





						def 					snake_case__						(							self  )       ->					int:
													self.config_tester.run_common_tests()





						def 					snake_case__						(							self  )       ->					Tuple:
													A__						  =				self.model_tester.prepare_config_and_inputs()
													self.model_tester.create_and_check_model(*__UpperCAmelCase  )





						@unittest.skip('PoolFormer does not use inputs_embeds'  )
						def 					snake_case__						(							self  )       ->					int:
													pass





						@unittest.skip('PoolFormer does not have get_input_embeddings method and get_output_embeddings methods'  )
						def 					snake_case__						(							self  )       ->					List[str]:
													pass





						def 					snake_case__						(							self  )       ->					List[Any]:
													def check_hidden_states_output(__UpperCAmelCase		,__UpperCAmelCase		,__UpperCAmelCase  ):
																				A__						  =				model_class(__UpperCAmelCase  )
																				model.to(__UpperCAmelCase  )
																				model.eval()

																				with torch.no_grad():
																											A__						  =				model(**self._prepare_for_class(__UpperCAmelCase		,__UpperCAmelCase  )  )

																				A__						  =				outputs.hidden_states

																				A__						  =				self.model_tester.num_encoder_blocks
																				self.assertEqual(len(__UpperCAmelCase  )		,__UpperCAmelCase  )

																				# verify the first hidden states (first block)
																				self.assertListEqual(
																				    list(hidden_states[0].shape[-3:]  )		,[
																				        self.model_tester.hidden_sizes[0],
																				        self.model_tester.image_size // 4,
																				        self.model_tester.image_size // 4,
																				    ]		,)

													A__  ,	A__						  =				self.model_tester.prepare_config_and_inputs_for_common()

													for model_class in self.all_model_classes:
																				A__						  =				True
																				check_hidden_states_output(__UpperCAmelCase		,__UpperCAmelCase		,__UpperCAmelCase  )

																				# check that output_hidden_states also work using config
																				del inputs_dict["output_hidden_states"]
																				A__						  =				True

																				check_hidden_states_output(__UpperCAmelCase		,__UpperCAmelCase		,__UpperCAmelCase  )





						def 					snake_case__						(							self  )       ->					Union[str, Any]:
													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:
																				if model_class in get_values(__UpperCAmelCase  ):
																											continue
																				A__						  =				model_class(__UpperCAmelCase  )
																				model.to(__UpperCAmelCase  )
																				model.train()
																				A__						  =				self._prepare_for_class(__UpperCAmelCase		,__UpperCAmelCase		,return_labels=__UpperCAmelCase  )
																				A__						  =				model(**__UpperCAmelCase  ).loss
																				loss.backward()





						def 					snake_case__						(							self  )       ->					Union[str, Any]:
													A__  ,	A__						  =				self.model_tester.prepare_config_and_inputs_for_common()

													for model_class in self.all_model_classes:
																				A__						  =				model_class(__UpperCAmelCase  )
																				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]		,__UpperCAmelCase  )





						@slow
						def 					snake_case__						(							self  )       ->					Union[str, Any]:
													for model_name in POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
																				A__						  =				PoolFormerModel.from_pretrained(__UpperCAmelCase  )
																				self.assertIsNotNone(__UpperCAmelCase  )






def 	UpperCAmelCase       (						):






							"""simple docstring"""





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


@require_torch
class      UpperCamelCase__(      unittest.TestCase			):





						@slow
						def 					snake_case__						(							self  )       ->					Union[str, Any]:
													A__						  =				PoolFormerImageProcessor()
													A__						  =				PoolFormerForImageClassification.from_pretrained('sail/poolformer_s12'  ).to(__UpperCAmelCase  )

													A__						  =				image_processor(images=prepare_img()		,return_tensors='pt'  ).to(__UpperCAmelCase  )

													# forward pass
													with torch.no_grad():
																				A__						  =				model(**__UpperCAmelCase  )

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

													A__						  =				torch.tensor([-0.6_1_1_3, 0.1_6_8_5, -0.0_4_9_2]  ).to(__UpperCAmelCase  )
													self.assertTrue(torch.allclose(outputs.logits[0, :3]		,__UpperCAmelCase		,atol=1e-4  )  )





