


import unittest

from transformers import ElectraConfig, is_torch_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, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
     import torch

     from transformers import (
         MODEL_FOR_PRETRAINING_MAPPING,
         ElectraForCausalLM,
         ElectraForMaskedLM,
         ElectraForMultipleChoice,
         ElectraForPreTraining,
         ElectraForQuestionAnswering,
         ElectraForSequenceClassification,
         ElectraForTokenClassification,
         ElectraModel,
     )
     from transformers.models.electra.modeling_electra import ELECTRA_PRETRAINED_MODEL_ARCHIVE_LIST

class     __snake_case							:
     def __init__(	self					:	str  ,			_lowerCAmelCase					:	Union[str, Any]  ,			_lowerCAmelCase					:	Dict=1_3  ,			_lowerCAmelCase					:	Tuple=7  ,			_lowerCAmelCase					:	Optional[Any]=True  ,			_lowerCAmelCase					:	Optional[int]=True  ,			_lowerCAmelCase					:	Any=True  ,			_lowerCAmelCase					:	Optional[int]=True  ,			_lowerCAmelCase					:	List[Any]=9_9  ,			_lowerCAmelCase					:	Optional[Any]=3_2  ,			_lowerCAmelCase					:	Union[str, Any]=5  ,			_lowerCAmelCase					:	str=4  ,			_lowerCAmelCase					:	List[str]=3_7  ,			_lowerCAmelCase					:	Optional[int]="gelu"  ,			_lowerCAmelCase					:	Optional[Any]=0.1  ,			_lowerCAmelCase					:	Dict=0.1  ,			_lowerCAmelCase					:	Dict=5_1_2  ,			_lowerCAmelCase					:	Dict=1_6  ,			_lowerCAmelCase					:	int=2  ,			_lowerCAmelCase					:	int=0.02  ,			_lowerCAmelCase					:	int=3  ,			_lowerCAmelCase					:	Dict=4  ,			_lowerCAmelCase					:	str=None  ,			)       ->				Union[str, Any]:



           '''simple docstring'''





           __magic_name__ 		=			parent
           __magic_name__ 		=			batch_size
           __magic_name__ 		=			seq_length
           __magic_name__ 		=			is_training
           __magic_name__ 		=			use_input_mask
           __magic_name__ 		=			use_token_type_ids
           __magic_name__ 		=			use_labels
           __magic_name__ 		=			vocab_size
           __magic_name__ 		=			hidden_size
           __magic_name__ 		=			num_hidden_layers
           __magic_name__ 		=			num_attention_heads
           __magic_name__ 		=			intermediate_size
           __magic_name__ 		=			hidden_act
           __magic_name__ 		=			hidden_dropout_prob
           __magic_name__ 		=			attention_probs_dropout_prob
           __magic_name__ 		=			max_position_embeddings
           __magic_name__ 		=			type_vocab_size
           __magic_name__ 		=			type_sequence_label_size
           __magic_name__ 		=			initializer_range
           __magic_name__ 		=			num_labels
           __magic_name__ 		=			num_choices
           __magic_name__ 		=			scope
     def   a (	self					:	List[str]     )       ->				List[Any]:



           '''simple docstring'''





           __magic_name__ 		=			ids_tensor([self.batch_size, self.seq_length]  ,			self.vocab_size     )

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

           __magic_name__ 		=			None
           if self.use_token_type_ids:
                 __magic_name__ 		=			ids_tensor([self.batch_size, self.seq_length]  ,			self.type_vocab_size     )

           __magic_name__ 		=			None
           __magic_name__ 		=			None
           __magic_name__ 		=			None
           if self.use_labels:
                 __magic_name__ 		=			ids_tensor([self.batch_size]  ,			self.type_sequence_label_size     )
                 __magic_name__ 		=			ids_tensor([self.batch_size, self.seq_length]  ,			self.num_labels     )
                 __magic_name__ 		=			ids_tensor([self.batch_size]  ,			self.num_choices     )
                 __magic_name__ 		=			ids_tensor([self.batch_size, self.seq_length]  ,			1     )

           __magic_name__ 		=			self.get_config()

           return (
               config,
               input_ids,
               token_type_ids,
               input_mask,
               sequence_labels,
               token_labels,
               choice_labels,
               fake_token_labels,
           )
     def   a (	self					:	List[str]     )       ->				Union[str, Any]:



           '''simple docstring'''





           return ElectraConfig(
               vocab_size=self.vocab_size  ,			hidden_size=self.hidden_size  ,			num_hidden_layers=self.num_hidden_layers  ,			num_attention_heads=self.num_attention_heads  ,			intermediate_size=self.intermediate_size  ,			hidden_act=self.hidden_act  ,			hidden_dropout_prob=self.hidden_dropout_prob  ,			attention_probs_dropout_prob=self.attention_probs_dropout_prob  ,			max_position_embeddings=self.max_position_embeddings  ,			type_vocab_size=self.type_vocab_size  ,			is_decoder=lowerCamelCase_  ,			initializer_range=self.initializer_range  ,			)
     def   a (	self					:	Tuple     )       ->				Optional[Any]:



           '''simple docstring'''





           (
               (
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,										
           ) 		=			self.prepare_config_and_inputs()

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

           return (
               config,
               input_ids,
               token_type_ids,
               input_mask,
               sequence_labels,
               token_labels,
               choice_labels,
               encoder_hidden_states,
               encoder_attention_mask,
           )
     def   a (	self					:	Optional[Any]  ,			_lowerCAmelCase					:	str  ,			_lowerCAmelCase					:	Dict  ,			_lowerCAmelCase					:	Tuple  ,			_lowerCAmelCase					:	Optional[int]  ,			_lowerCAmelCase					:	int  ,			_lowerCAmelCase					:	Optional[Any]  ,			_lowerCAmelCase					:	Union[str, Any]  ,			_lowerCAmelCase					:	int  ,			)       ->				Union[str, Any]:



           '''simple docstring'''





           __magic_name__ 		=			ElectraModel(config=lowerCamelCase_     )
           model.to(lowerCamelCase_     )
           model.eval()
           __magic_name__ 		=			model(lowerCamelCase_  ,			attention_mask=lowerCamelCase_  ,			token_type_ids=lowerCamelCase_     )
           __magic_name__ 		=			model(lowerCamelCase_  ,			token_type_ids=lowerCamelCase_     )
           __magic_name__ 		=			model(lowerCamelCase_     )
           self.parent.assertEqual(result.last_hidden_state.shape  ,			(self.batch_size, self.seq_length, self.hidden_size)     )
     def   a (	self					:	Optional[int]  ,			_lowerCAmelCase					:	Optional[int]  ,			_lowerCAmelCase					:	str  ,			_lowerCAmelCase					:	Dict  ,			_lowerCAmelCase					:	Any  ,			_lowerCAmelCase					:	Tuple  ,			_lowerCAmelCase					:	Optional[int]  ,			_lowerCAmelCase					:	Union[str, Any]  ,			_lowerCAmelCase					:	Dict  ,			_lowerCAmelCase					:	Union[str, Any]  ,			)       ->				Any:



           '''simple docstring'''





           __magic_name__ 		=			True
           __magic_name__ 		=			ElectraModel(lowerCamelCase_     )
           model.to(lowerCamelCase_     )
           model.eval()
           __magic_name__ 		=			model(
               lowerCamelCase_  ,			attention_mask=lowerCamelCase_  ,			token_type_ids=lowerCamelCase_  ,			encoder_hidden_states=lowerCamelCase_  ,			encoder_attention_mask=lowerCamelCase_  ,			)
           __magic_name__ 		=			model(
               lowerCamelCase_  ,			attention_mask=lowerCamelCase_  ,			token_type_ids=lowerCamelCase_  ,			encoder_hidden_states=lowerCamelCase_  ,			)
           __magic_name__ 		=			model(lowerCamelCase_  ,			attention_mask=lowerCamelCase_  ,			token_type_ids=lowerCamelCase_     )
           self.parent.assertEqual(result.last_hidden_state.shape  ,			(self.batch_size, self.seq_length, self.hidden_size)     )
     def   a (	self					:	List[Any]  ,			_lowerCAmelCase					:	List[str]  ,			_lowerCAmelCase					:	Optional[Any]  ,			_lowerCAmelCase					:	Optional[int]  ,			_lowerCAmelCase					:	Optional[int]  ,			_lowerCAmelCase					:	Any  ,			_lowerCAmelCase					:	Optional[Any]  ,			_lowerCAmelCase					:	List[Any]  ,			_lowerCAmelCase					:	Optional[Any]  ,			)       ->				str:



           '''simple docstring'''





           __magic_name__ 		=			ElectraForMaskedLM(config=lowerCamelCase_     )
           model.to(lowerCamelCase_     )
           model.eval()
           __magic_name__ 		=			model(lowerCamelCase_  ,			attention_mask=lowerCamelCase_  ,			token_type_ids=lowerCamelCase_  ,			labels=lowerCamelCase_     )
           self.parent.assertEqual(result.logits.shape  ,			(self.batch_size, self.seq_length, self.vocab_size)     )
     def   a (	self					:	List[str]  ,			_lowerCAmelCase					:	Optional[int]  ,			_lowerCAmelCase					:	List[str]  ,			_lowerCAmelCase					:	int  ,			_lowerCAmelCase					:	Any  ,			_lowerCAmelCase					:	Optional[Any]  ,			_lowerCAmelCase					:	Optional[int]  ,			_lowerCAmelCase					:	Optional[int]  ,			_lowerCAmelCase					:	int  ,			_lowerCAmelCase					:	List[str]  ,			)       ->				Optional[Any]:



           '''simple docstring'''





           __magic_name__ 		=			ElectraForCausalLM(config=lowerCamelCase_     )
           model.to(lowerCamelCase_     )
           model.eval()
           __magic_name__ 		=			model(lowerCamelCase_  ,			attention_mask=lowerCamelCase_  ,			token_type_ids=lowerCamelCase_  ,			labels=lowerCamelCase_     )
           self.parent.assertEqual(result.logits.shape  ,			(self.batch_size, self.seq_length, self.vocab_size)     )
     def   a (	self					:	Tuple  ,			_lowerCAmelCase					:	Optional[int]  ,			_lowerCAmelCase					:	Any  ,			_lowerCAmelCase					:	Tuple  ,			_lowerCAmelCase					:	List[str]  ,			_lowerCAmelCase					:	List[str]  ,			_lowerCAmelCase					:	Optional[Any]  ,			_lowerCAmelCase					:	Dict  ,			_lowerCAmelCase					:	List[Any]  ,			)       ->				Tuple:



           '''simple docstring'''





           __magic_name__ 		=			self.num_labels
           __magic_name__ 		=			ElectraForTokenClassification(config=lowerCamelCase_     )
           model.to(lowerCamelCase_     )
           model.eval()
           __magic_name__ 		=			model(lowerCamelCase_  ,			attention_mask=lowerCamelCase_  ,			token_type_ids=lowerCamelCase_  ,			labels=lowerCamelCase_     )
           self.parent.assertEqual(result.logits.shape  ,			(self.batch_size, self.seq_length, self.num_labels)     )
     def   a (	self					:	Union[str, Any]  ,			_lowerCAmelCase					:	List[Any]  ,			_lowerCAmelCase					:	int  ,			_lowerCAmelCase					:	Dict  ,			_lowerCAmelCase					:	Dict  ,			_lowerCAmelCase					:	List[Any]  ,			_lowerCAmelCase					:	Dict  ,			_lowerCAmelCase					:	Any  ,			_lowerCAmelCase					:	Any  ,			)       ->				str:



           '''simple docstring'''





           __magic_name__ 		=			self.num_labels
           __magic_name__ 		=			ElectraForPreTraining(config=lowerCamelCase_     )
           model.to(lowerCamelCase_     )
           model.eval()
           __magic_name__ 		=			model(lowerCamelCase_  ,			attention_mask=lowerCamelCase_  ,			token_type_ids=lowerCamelCase_  ,			labels=lowerCamelCase_     )
           self.parent.assertEqual(result.logits.shape  ,			(self.batch_size, self.seq_length)     )
     def   a (	self					:	Optional[Any]  ,			_lowerCAmelCase					:	Any  ,			_lowerCAmelCase					:	Optional[Any]  ,			_lowerCAmelCase					:	Dict  ,			_lowerCAmelCase					:	Dict  ,			_lowerCAmelCase					:	List[Any]  ,			_lowerCAmelCase					:	Union[str, Any]  ,			_lowerCAmelCase					:	Union[str, Any]  ,			_lowerCAmelCase					:	Any  ,			)       ->				Optional[int]:



           '''simple docstring'''





           __magic_name__ 		=			self.num_labels
           __magic_name__ 		=			ElectraForSequenceClassification(lowerCamelCase_     )
           model.to(lowerCamelCase_     )
           model.eval()
           __magic_name__ 		=			model(lowerCamelCase_  ,			attention_mask=lowerCamelCase_  ,			token_type_ids=lowerCamelCase_  ,			labels=lowerCamelCase_     )
           self.parent.assertEqual(result.logits.shape  ,			(self.batch_size, self.num_labels)     )
     def   a (	self					:	Tuple  ,			_lowerCAmelCase					:	Any  ,			_lowerCAmelCase					:	str  ,			_lowerCAmelCase					:	Union[str, Any]  ,			_lowerCAmelCase					:	List[Any]  ,			_lowerCAmelCase					:	Optional[Any]  ,			_lowerCAmelCase					:	Dict  ,			_lowerCAmelCase					:	Union[str, Any]  ,			_lowerCAmelCase					:	List[str]  ,			)       ->				Optional[int]:



           '''simple docstring'''





           __magic_name__ 		=			ElectraForQuestionAnswering(config=lowerCamelCase_     )
           model.to(lowerCamelCase_     )
           model.eval()
           __magic_name__ 		=			model(
               lowerCamelCase_  ,			attention_mask=lowerCamelCase_  ,			token_type_ids=lowerCamelCase_  ,			start_positions=lowerCamelCase_  ,			end_positions=lowerCamelCase_  ,			)
           self.parent.assertEqual(result.start_logits.shape  ,			(self.batch_size, self.seq_length)     )
           self.parent.assertEqual(result.end_logits.shape  ,			(self.batch_size, self.seq_length)     )
     def   a (	self					:	Optional[int]  ,			_lowerCAmelCase					:	Union[str, Any]  ,			_lowerCAmelCase					:	List[str]  ,			_lowerCAmelCase					:	List[str]  ,			_lowerCAmelCase					:	List[str]  ,			_lowerCAmelCase					:	Optional[Any]  ,			_lowerCAmelCase					:	Dict  ,			_lowerCAmelCase					:	str  ,			_lowerCAmelCase					:	str  ,			)       ->				Optional[int]:



           '''simple docstring'''





           __magic_name__ 		=			self.num_choices
           __magic_name__ 		=			ElectraForMultipleChoice(config=lowerCamelCase_     )
           model.to(lowerCamelCase_     )
           model.eval()
           __magic_name__ 		=			input_ids.unsqueeze(1     ).expand(-1  ,			self.num_choices  ,			-1     ).contiguous()
           __magic_name__ 		=			token_type_ids.unsqueeze(1     ).expand(-1  ,			self.num_choices  ,			-1     ).contiguous()
           __magic_name__ 		=			input_mask.unsqueeze(1     ).expand(-1  ,			self.num_choices  ,			-1     ).contiguous()
           __magic_name__ 		=			model(
               lowerCamelCase_  ,			attention_mask=lowerCamelCase_  ,			token_type_ids=lowerCamelCase_  ,			labels=lowerCamelCase_  ,			)
           self.parent.assertEqual(result.logits.shape  ,			(self.batch_size, self.num_choices)     )







     def   a (	self					:	str     )       ->				Any:



           '''simple docstring'''





           __magic_name__ 		=			self.prepare_config_and_inputs()
           (
               (
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,			(
               __magic_name__							
           )		,										
           ) 		=			config_and_inputs
           __magic_name__ 		=			{'input_ids': input_ids, 'token_type_ids': token_type_ids, 'attention_mask': input_mask}
           return config, inputs_dict







@require_torch
class     __snake_case							(      lowerCAmelCase_  ,			lowerCAmelCase_  ,			unittest.TestCase):
     SCREAMING_SNAKE_CASE_		:					Optional[int] 				= (
         (
             ElectraModel,
             ElectraForPreTraining,
             ElectraForMaskedLM,
             ElectraForCausalLM,
             ElectraForMultipleChoice,
             ElectraForTokenClassification,
             ElectraForSequenceClassification,
             ElectraForQuestionAnswering,
         )
         if is_torch_available()
         else ()
     )
     SCREAMING_SNAKE_CASE_		:					Optional[Any] 				= (
         {
             'feature-extraction': ElectraModel,
             'fill-mask': ElectraForMaskedLM,
             'question-answering': ElectraForQuestionAnswering,
             'text-classification': ElectraForSequenceClassification,
             'text-generation': ElectraForCausalLM,
             'token-classification': ElectraForTokenClassification,
             'zero-shot': ElectraForSequenceClassification,
         }
         if is_torch_available()
         else {}
     )
     SCREAMING_SNAKE_CASE_		:					Optional[int] 				= True
     def   a (	self					:	List[str]  ,			_lowerCAmelCase					:	List[Any]  ,			_lowerCAmelCase					:	Dict  ,			_lowerCAmelCase					:	List[Any]=False     )       ->				List[str]:



           '''simple docstring'''





           __magic_name__ 		=			super()._prepare_for_class(lowerCamelCase_  ,			lowerCamelCase_  ,			return_labels=lowerCamelCase_     )

           if return_labels:
                 if model_class in get_values(lowerCamelCase_     ):
                       __magic_name__ 		=			torch.zeros(
                           (self.model_tester.batch_size, self.model_tester.seq_length)  ,			dtype=torch.long  ,			device=lowerCamelCase_     )
           return inputs_dict
     def   a (	self					:	Dict     )       ->				List[str]:



           '''simple docstring'''





           __magic_name__ 		=			ElectraModelTester(self     )
           __magic_name__ 		=			ConfigTester(self  ,			config_class=lowerCamelCase_  ,			hidden_size=3_7     )
     def   a (	self					:	Dict     )       ->				Union[str, Any]:



           '''simple docstring'''





           self.config_tester.run_common_tests()
     def   a (	self					:	Optional[Any]     )       ->				List[str]:



           '''simple docstring'''





           __magic_name__ 		=			self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_electra_model(*lowerCamelCase_     )
     def   a (	self					:	Tuple     )       ->				Union[str, Any]:



           '''simple docstring'''





           __magic_name__ 		=			self.model_tester.prepare_config_and_inputs_for_decoder()
           self.model_tester.create_and_check_electra_model_as_decoder(*lowerCamelCase_     )
     def   a (	self					:	List[Any]     )       ->				Any:



           '''simple docstring'''





           __magic_name__ 		=			self.model_tester.prepare_config_and_inputs()
           for type in ["absolute", "relative_key", "relative_key_query"]:
                 __magic_name__ 		=			type
                 self.model_tester.create_and_check_electra_model(*lowerCamelCase_     )
     def   a (	self					:	Any     )       ->				Dict:



           '''simple docstring'''





           __magic_name__ 		=			self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_electra_for_masked_lm(*lowerCamelCase_     )
     def   a (	self					:	int     )       ->				int:



           '''simple docstring'''





           __magic_name__ 		=			self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_electra_for_token_classification(*lowerCamelCase_     )
     def   a (	self					:	Dict     )       ->				List[Any]:



           '''simple docstring'''





           __magic_name__ 		=			self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_electra_for_pretraining(*lowerCamelCase_     )
     def   a (	self					:	str     )       ->				Optional[Any]:



           '''simple docstring'''





           __magic_name__ 		=			self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_electra_for_sequence_classification(*lowerCamelCase_     )
     def   a (	self					:	Tuple     )       ->				str:



           '''simple docstring'''





           __magic_name__ 		=			self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_electra_for_question_answering(*lowerCamelCase_     )
     def   a (	self					:	Optional[int]     )       ->				int:



           '''simple docstring'''





           __magic_name__ 		=			self.model_tester.prepare_config_and_inputs()
           self.model_tester.create_and_check_electra_for_multiple_choice(*lowerCamelCase_     )
     @slow
     def   a (	self					:	List[Any]     )       ->				Optional[Any]:



           '''simple docstring'''





           for model_name in ELECTRA_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
                 __magic_name__ 		=			ElectraModel.from_pretrained(lowerCamelCase_     )
                 self.assertIsNotNone(lowerCamelCase_     )







     def   a (	self					:	List[Any]     )       ->				Optional[int]:



           '''simple docstring'''





           __magic_name__ 		=			self.model_tester.prepare_config_and_inputs_for_decoder()
           self.model_tester.create_and_check_electra_for_causal_lm(*lowerCamelCase_     )







@require_torch
class     __snake_case							(      unittest.TestCase):
     @slow
     def   a (	self					:	List[Any]     )       ->				Union[str, Any]:



           '''simple docstring'''





           __magic_name__ 		=			ElectraModel.from_pretrained('google/electra-small-discriminator'     )
           __magic_name__ 		=			torch.tensor([[0, 3_4_5, 2_3_2, 3_2_8, 7_4_0, 1_4_0, 1_6_9_5, 6_9, 6_0_7_8, 1_5_8_8, 2]]     )
           __magic_name__ 		=			torch.tensor([[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]     )
           __magic_name__ 		=			model(lowerCamelCase_  ,			attention_mask=lowerCamelCase_     )[0]
           __magic_name__ 		=			torch.Size((1, 1_1, 2_5_6)     )
           self.assertEqual(output.shape  ,			lowerCamelCase_     )
           __magic_name__ 		=			torch.tensor(
               [[[0.4471, 0.6821, -0.3265], [0.4627, 0.5255, -0.3668], [0.4532, 0.3313, -0.4344]]]     )

           self.assertTrue(torch.allclose(output[:, 1:4, 1:4]  ,			lowerCamelCase_  ,			atol=1E-4     )     )





def 							UpperCamelCase_  (				__snake_case			:						list[int]     )->      tuple[int, int]:




						'''simple docstring'''
						# base case
						if len(__snake_case     ) == 1:
												return a[0], a[0]
						else:
												# split A into half.
												__magic_name__ 		=			a[: len(__snake_case     ) // 2]
												__magic_name__ 		=			a[len(__snake_case     ) // 2 :]

												# 2 sub problems, 1/2 of original size.
												__magic_name__		,			__magic_name__ 		=			max_difference(__snake_case     )
												__magic_name__		,			__magic_name__ 		=			max_difference(__snake_case     )

												# get min of first and max of second
												# linear time
												__magic_name__ 		=			min(__snake_case     )
												__magic_name__ 		=			max(__snake_case     )

												# 3 cases, either (small1, big1),
												# (min_first, max_second), (small2, big2)
												# constant comparisons
												if biga - smalla > max_second - min_first and biga - smalla > biga - smalla:
																		return smalla, biga
												elif biga - smalla > max_second - min_first:
																		return smalla, biga
												else:
																		return min_first, max_second


if __name__ == "__main__":
					import doctest

					doctest.testmod()

