





'''simple docstring'''




import math
import unittest

from transformers import BioGptConfig, is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...generation.test_utils import GenerationTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
  import torch

  from transformers import (
      BioGptForCausalLM,
      BioGptForSequenceClassification,
      BioGptForTokenClassification,
      BioGptModel,
      BioGptTokenizer,
  )
  from transformers.models.biogpt.modeling_biogpt import BIOGPT_PRETRAINED_MODEL_ARCHIVE_LIST


class 			SCREAMING_SNAKE_CASE   :


     def __init__(						self						,     _UpperCAmelCase						,     _UpperCAmelCase=13						,     _UpperCAmelCase=7						,     _UpperCAmelCase=True						,     _UpperCAmelCase=True						,     _UpperCAmelCase=False						,     _UpperCAmelCase=True						,     _UpperCAmelCase=99						,     _UpperCAmelCase=32						,     _UpperCAmelCase=5						,     _UpperCAmelCase=4						,     _UpperCAmelCase=37						,     _UpperCAmelCase="gelu"						,     _UpperCAmelCase=0.1						,     _UpperCAmelCase=0.1						,     _UpperCAmelCase=512						,     _UpperCAmelCase=16						,     _UpperCAmelCase=2						,     _UpperCAmelCase=0.02						,     _UpperCAmelCase=3						,     _UpperCAmelCase=4						,     _UpperCAmelCase=None						,     ):

          '''simple docstring'''






          __A						:			Any								=	parent
          __A						:			Tuple								=	batch_size
          __A						:			List[Any]								=	seq_length
          __A						:			str								=	is_training
          __A						:			Any								=	use_input_mask
          __A						:			Tuple								=	use_token_type_ids
          __A						:			Dict								=	use_labels
          __A						:			Optional[Any]								=	vocab_size
          __A						:			Union[str, Any]								=	hidden_size
          __A						:			Optional[Any]								=	num_hidden_layers
          __A						:			List[Any]								=	num_attention_heads
          __A						:			Dict								=	intermediate_size
          __A						:			Optional[int]								=	hidden_act
          __A						:			Optional[Any]								=	hidden_dropout_prob
          __A						:			Optional[Any]								=	attention_probs_dropout_prob
          __A						:			str								=	max_position_embeddings
          __A						:			Any								=	type_vocab_size
          __A						:			List[Any]								=	type_sequence_label_size
          __A						:			List[str]								=	initializer_range
          __A						:			Union[str, Any]								=	num_labels
          __A						:			str								=	num_choices
          __A						:			Optional[Any]								=	scope


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			Dict								=	ids_tensor([self.batch_size, self.seq_length]						,     self.vocab_size)

          __A						:			Any								=	None
          if self.use_input_mask:
               __A						:			List[str]								=	random_attention_mask([self.batch_size, self.seq_length])

          __A						:			List[Any]								=	None
          if self.use_token_type_ids:
               __A						:			Tuple								=	ids_tensor([self.batch_size, self.seq_length]						,     self.type_vocab_size)

          __A						:			List[Any]								=	None
          __A						:			Optional[Any]								=	None
          __A						:			Dict								=	None
          if self.use_labels:
               __A						:			Dict								=	ids_tensor([self.batch_size]						,     self.type_sequence_label_size)
               __A						:			Dict								=	ids_tensor([self.batch_size, self.seq_length]						,     self.num_labels)
               __A						:			Dict								=	ids_tensor([self.batch_size]						,     self.num_choices)

          __A						:			Optional[int]								=	self.get_config()

          return config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          return BioGptConfig(
              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=_UpperCAmelCase						,     initializer_range=self.initializer_range						,     )


     def 							SCREAMING_SNAKE_CASE  (						self						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase):

          '''simple docstring'''






          __A						:			Dict								=	BioGptModel(config=_UpperCAmelCase)
          model.to(_UpperCAmelCase)
          model.eval()
          __A						:			Optional[Any]								=	model(_UpperCAmelCase						,     attention_mask=_UpperCAmelCase)
          __A						:			List[Any]								=	model(_UpperCAmelCase)
          self.parent.assertEqual(result.last_hidden_state.shape						,     (self.batch_size, self.seq_length, self.hidden_size))


     def 							SCREAMING_SNAKE_CASE  (						self						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     ):

          '''simple docstring'''






          __A						:			Dict								=	BioGptForCausalLM(config=_UpperCAmelCase)
          model.to(_UpperCAmelCase)
          model.eval()
          __A						:			Optional[Any]								=	model(_UpperCAmelCase						,     attention_mask=_UpperCAmelCase						,     token_type_ids=_UpperCAmelCase						,     labels=_UpperCAmelCase)
          self.parent.assertEqual(result.logits.shape						,     (self.batch_size, self.seq_length, self.vocab_size))


     def 							SCREAMING_SNAKE_CASE  (						self						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     *_UpperCAmelCase):

          '''simple docstring'''






          __A						:			List[Any]								=	BioGptModel(config=_UpperCAmelCase)
          model.to(_UpperCAmelCase)
          model.eval()

          # create attention mask
          __A						:			int								=	torch.ones(input_ids.shape						,     dtype=torch.long						,     device=_UpperCAmelCase)
          __A						:			List[Any]								=	self.seq_length // 2
          __A						:			List[str]								=	0

          # first forward pass
          __A			,__A						:			Union[str, Any]								=	model(_UpperCAmelCase						,     attention_mask=_UpperCAmelCase).to_tuple()

          # create hypothetical next token and extent to next_input_ids
          __A						:			Dict								=	ids_tensor((self.batch_size, 1)						,     config.vocab_size)

          # change a random masked slice from input_ids
          __A						:			Optional[Any]								=	ids_tensor((1,)						,     _UpperCAmelCase).item() + 1
          __A						:			Optional[int]								=	ids_tensor((self.batch_size, 1)						,     config.vocab_size).squeeze(-1)
          __A						:			Optional[Any]								=	random_other_next_tokens

          # append to next input_ids and attn_mask
          __A						:			List[str]								=	torch.cat([input_ids, next_tokens]						,     dim=-1)
          __A						:			Any								=	torch.cat(
              [attn_mask, torch.ones((attn_mask.shape[0], 1)						,     dtype=torch.long						,     device=_UpperCAmelCase)]						,     dim=1						,     )

          # get two different outputs
          __A						:			Tuple								=	model(_UpperCAmelCase						,     attention_mask=_UpperCAmelCase)['last_hidden_state']
          __A						:			Optional[Any]								=	model(_UpperCAmelCase						,     past_key_values=_UpperCAmelCase						,     attention_mask=_UpperCAmelCase)['last_hidden_state']

          # select random slice
          __A						:			List[str]								=	ids_tensor((1,)						,     output_from_past.shape[-1]).item()
          __A						:			Union[str, Any]								=	output_from_no_past[:, -1, random_slice_idx].detach()
          __A						:			str								=	output_from_past[:, 0, random_slice_idx].detach()

          # test that outputs are equal for slice
          self.parent.assertTrue(torch.allclose(_UpperCAmelCase						,     _UpperCAmelCase						,     atol=1e-3))


     def 							SCREAMING_SNAKE_CASE  (						self						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     *_UpperCAmelCase):

          '''simple docstring'''






          __A						:			List[Any]								=	BioGptModel(config=_UpperCAmelCase).to(_UpperCAmelCase).eval()

          __A						:			Any								=	torch.ones(input_ids.shape						,     dtype=torch.long						,     device=_UpperCAmelCase)

          # first forward pass
          __A						:			Dict								=	model(_UpperCAmelCase						,     attention_mask=_UpperCAmelCase						,     use_cache=_UpperCAmelCase)

          __A			,__A						:			Union[str, Any]								=	outputs.to_tuple()

          # create hypothetical multiple next token and extent to next_input_ids
          __A						:			Any								=	ids_tensor((self.batch_size, 3)						,     config.vocab_size)
          __A						:			Dict								=	ids_tensor((self.batch_size, 3)						,     2)

          # append to next input_ids and
          __A						:			List[Any]								=	torch.cat([input_ids, next_tokens]						,     dim=-1)
          __A						:			List[str]								=	torch.cat([attention_mask, next_attn_mask]						,     dim=-1)

          __A						:			List[str]								=	model(_UpperCAmelCase						,     attention_mask=_UpperCAmelCase)['last_hidden_state']
          __A						:			Dict								=	model(_UpperCAmelCase						,     attention_mask=_UpperCAmelCase						,     past_key_values=_UpperCAmelCase)[
              'last_hidden_state'
          ]

          # select random slice
          __A						:			Dict								=	ids_tensor((1,)						,     output_from_past.shape[-1]).item()
          __A						:			str								=	output_from_no_past[:, -3:, random_slice_idx].detach()
          __A						:			Tuple								=	output_from_past[:, :, random_slice_idx].detach()

          self.parent.assertTrue(output_from_past_slice.shape[1] == next_tokens.shape[1])

          # test that outputs are equal for slice
          self.parent.assertTrue(torch.allclose(_UpperCAmelCase						,     _UpperCAmelCase						,     atol=1e-3))


     def 							SCREAMING_SNAKE_CASE  (						self						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     *_UpperCAmelCase						,     _UpperCAmelCase=False):

          '''simple docstring'''






          __A						:			Any								=	BioGptForCausalLM(_UpperCAmelCase)
          model.to(_UpperCAmelCase)
          if gradient_checkpointing:
               model.gradient_checkpointing_enable()

          __A						:			Union[str, Any]								=	model(_UpperCAmelCase						,     labels=_UpperCAmelCase)
          self.parent.assertEqual(result.loss.shape						,     ())
          self.parent.assertEqual(result.logits.shape						,     (self.batch_size, self.seq_length, self.vocab_size))
          result.loss.backward()


     def 							SCREAMING_SNAKE_CASE  (						self						,     _UpperCAmelCase						,     *_UpperCAmelCase):

          '''simple docstring'''






          __A						:			Any								=	BioGptModel(_UpperCAmelCase)
          __A						:			List[str]								=	model.config.initializer_range / math.sqrt(2 * model.config.num_hidden_layers)
          for key in model.state_dict().keys():
               if "c_proj" in key and "weight" in key:
                    self.parent.assertLessEqual(abs(torch.std(model.state_dict()[key]) - model_std)						,     0.001)
                    self.parent.assertLessEqual(abs(torch.mean(model.state_dict()[key]) - 0.0)						,     0.01)


     def 							SCREAMING_SNAKE_CASE  (						self						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     _UpperCAmelCase						,     *_UpperCAmelCase):

          '''simple docstring'''






          __A						:			List[str]								=	self.num_labels
          __A						:			Optional[int]								=	BioGptForTokenClassification(_UpperCAmelCase)
          model.to(_UpperCAmelCase)
          model.eval()
          __A						:			Optional[Any]								=	model(_UpperCAmelCase						,     attention_mask=_UpperCAmelCase						,     token_type_ids=_UpperCAmelCase)
          self.parent.assertEqual(result.logits.shape						,     (self.batch_size, self.seq_length, self.num_labels))


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			List[Any]								=	self.prepare_config_and_inputs()
          (
              (
              __A
          )			,(
              __A
          )			,(
              __A
          )			,(
              __A
          )			,(
              __A
          )			,(
              __A
          )			,(
              __A
          )			,
          )						:			int								=	config_and_inputs
          __A						:			Dict								=	{'input_ids': input_ids, 'attention_mask': input_mask}
          return config, inputs_dict




@require_torch
class 			SCREAMING_SNAKE_CASE   (a__ ,		a__ ,		a__ ,		unittest.TestCase							):
     lowerCAmelCase		      =	(
         (BioGptModel, BioGptForCausalLM, BioGptForSequenceClassification, BioGptForTokenClassification)
         if is_torch_available()
         else ()
     )
     lowerCAmelCase		      =	(BioGptForCausalLM,) if is_torch_available() else ()
     lowerCAmelCase		      =	(
         {
             '''feature-extraction''': BioGptModel,
             '''text-classification''': BioGptForSequenceClassification,
             '''text-generation''': BioGptForCausalLM,
             '''token-classification''': BioGptForTokenClassification,
             '''zero-shot''': BioGptForSequenceClassification,
         }
         if is_torch_available()
         else {}
     )
     lowerCAmelCase		      =	False


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			List[Any]								=	BioGptModelTester(self)
          __A						:			List[Any]								=	ConfigTester(self						,     config_class=_UpperCAmelCase						,     hidden_size=37)


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          self.config_tester.run_common_tests()


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			Optional[int]								=	self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_model(*_UpperCAmelCase)


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			Union[str, Any]								=	self.model_tester.prepare_config_and_inputs()
          for type in ["absolute", "relative_key", "relative_key_query"]:
               __A						:			Optional[int]								=	type
               self.model_tester.create_and_check_model(*_UpperCAmelCase)


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			Dict								=	self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_biogpt_model_attention_mask_past(*_UpperCAmelCase)


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			List[str]								=	self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_forward_and_backwards(*_UpperCAmelCase						,     gradient_checkpointing=_UpperCAmelCase)


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			int								=	self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_biogpt_model_past_large_inputs(*_UpperCAmelCase)


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			Tuple								=	self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_biogpt_weight_initialization(*_UpperCAmelCase)


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			Dict								=	self.model_tester.prepare_config_and_inputs()
          self.model_tester.create_and_check_biogpt_for_token_classification(*_UpperCAmelCase)


     @slow
     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			List[str]								=	BioGptForCausalLM.from_pretrained('microsoft/biogpt')
          model.to(_UpperCAmelCase)
          __A						:			Tuple								=	BioGptTokenizer.from_pretrained('microsoft/biogpt')

          __A						:			str								=	'left'

          # Define PAD Token = EOS Token = 50256
          __A						:			Dict								=	tokenizer.eos_token
          __A						:			List[str]								=	model.config.eos_token_id

          # use different length sentences to test batching
          __A						:			Tuple								=	[
              'Hello, my dog is a little',
              'Today, I',
          ]

          __A						:			Optional[int]								=	tokenizer(_UpperCAmelCase						,     return_tensors='pt'						,     padding=_UpperCAmelCase)
          __A						:			Optional[int]								=	inputs['input_ids'].to(_UpperCAmelCase)

          __A						:			Any								=	model.generate(
              input_ids=_UpperCAmelCase						,     attention_mask=inputs['attention_mask'].to(_UpperCAmelCase)						,     )

          __A						:			str								=	tokenizer(sentences[0]						,     return_tensors='pt').input_ids.to(_UpperCAmelCase)
          __A						:			str								=	model.generate(input_ids=_UpperCAmelCase)

          __A						:			str								=	inputs_non_padded.shape[-1] - inputs['attention_mask'][-1].long().sum().cpu().item()
          __A						:			Optional[int]								=	tokenizer(sentences[1]						,     return_tensors='pt').input_ids.to(_UpperCAmelCase)
          __A						:			int								=	model.generate(input_ids=_UpperCAmelCase						,     max_length=model.config.max_length - num_paddings)

          __A						:			Optional[Any]								=	tokenizer.batch_decode(_UpperCAmelCase						,     skip_special_tokens=_UpperCAmelCase)
          __A						:			Optional[Any]								=	tokenizer.decode(output_non_padded[0]						,     skip_special_tokens=_UpperCAmelCase)
          __A						:			int								=	tokenizer.decode(output_padded[0]						,     skip_special_tokens=_UpperCAmelCase)

          __A						:			Optional[Any]								=	[
              'Hello, my dog is a little bit bigger than a little bit.',
              'Today, I have a good idea of how to use the information',
          ]
          self.assertListEqual(_UpperCAmelCase						,     _UpperCAmelCase)
          self.assertListEqual(_UpperCAmelCase						,     [non_padded_sentence, padded_sentence])


     @slow
     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          for model_name in BIOGPT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
               __A						:			Tuple								=	BioGptModel.from_pretrained(_UpperCAmelCase)
               self.assertIsNotNone(_UpperCAmelCase)


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A			,__A						:			Union[str, Any]								=	self.model_tester.prepare_config_and_inputs_for_common()
          __A						:			Any								=	3
          __A						:			List[str]								=	input_dict['input_ids']
          __A						:			Union[str, Any]								=	input_ids.ne(1).to(_UpperCAmelCase)
          __A						:			int								=	ids_tensor([self.model_tester.batch_size]						,     self.model_tester.type_sequence_label_size)
          __A						:			List[Any]								=	BioGptForSequenceClassification(_UpperCAmelCase)
          model.to(_UpperCAmelCase)
          model.eval()
          __A						:			Optional[int]								=	model(_UpperCAmelCase						,     attention_mask=_UpperCAmelCase						,     labels=_UpperCAmelCase)
          self.assertEqual(result.logits.shape						,     (self.model_tester.batch_size, self.model_tester.num_labels))


     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A			,__A						:			Optional[Any]								=	self.model_tester.prepare_config_and_inputs_for_common()
          __A						:			Dict								=	3
          __A						:			Tuple								=	'multi_label_classification'
          __A						:			Union[str, Any]								=	input_dict['input_ids']
          __A						:			Dict								=	input_ids.ne(1).to(_UpperCAmelCase)
          __A						:			Tuple								=	ids_tensor(
              [self.model_tester.batch_size, config.num_labels]						,     self.model_tester.type_sequence_label_size).to(torch.float)
          __A						:			Any								=	BioGptForSequenceClassification(_UpperCAmelCase)
          model.to(_UpperCAmelCase)
          model.eval()
          __A						:			int								=	model(_UpperCAmelCase						,     attention_mask=_UpperCAmelCase						,     labels=_UpperCAmelCase)
          self.assertEqual(result.logits.shape						,     (self.model_tester.batch_size, self.model_tester.num_labels))




@require_torch
class 			SCREAMING_SNAKE_CASE   (unittest.TestCase							):


     @slow
     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			Union[str, Any]								=	BioGptForCausalLM.from_pretrained('microsoft/biogpt')
          __A						:			Optional[int]								=	torch.tensor([[2, 4805, 9, 656, 21]])
          __A						:			str								=	model(_UpperCAmelCase)[0]

          __A						:			List[Any]								=	4_2384

          __A						:			Union[str, Any]								=	torch.Size((1, 5, vocab_size))
          self.assertEqual(output.shape						,     _UpperCAmelCase)

          __A						:			Union[str, Any]								=	torch.tensor(
              [[[-9.5236, -9.8918, 10.4557], [-11.0469, -9.6423, 8.1022], [-8.8664, -7.8826, 5.5325]]])

          self.assertTrue(torch.allclose(output[:, :3, :3]						,     _UpperCAmelCase						,     atol=1e-4))


     @slow
     def 							SCREAMING_SNAKE_CASE  (						self):

          '''simple docstring'''






          __A						:			Any								=	BioGptTokenizer.from_pretrained('microsoft/biogpt')
          __A						:			Optional[int]								=	BioGptForCausalLM.from_pretrained('microsoft/biogpt')
          model.to(_UpperCAmelCase)

          torch.manual_seed(0)
          __A						:			str								=	tokenizer('COVID-19 is'						,     return_tensors='pt').to(_UpperCAmelCase)
          __A						:			Optional[Any]								=	model.generate(
              **_UpperCAmelCase						,     min_length=100						,     max_length=1024						,     num_beams=5						,     early_stopping=_UpperCAmelCase						,     )
          __A						:			Any								=	tokenizer.decode(output_ids[0]						,     skip_special_tokens=_UpperCAmelCase)

          __A						:			List[str]								=	(
              'COVID-19 is a global pandemic caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2), the'
              ' causative agent of coronavirus disease 2019 (COVID-19), which has spread to more than 200 countries and'
              ' territories, including the United States (US), Canada, Australia, New Zealand, the United Kingdom (UK),'
              ' and the United States of America (USA), as of March 11, 2020, with more than 800,000 confirmed cases and'
              ' more than 800,000 deaths.'
          )
          self.assertEqual(_UpperCAmelCase						,     _UpperCAmelCase)






'''simple docstring'''




import math






def 	_lowerCAmelCase      (  __snake_case  :			int      )					->					int:

     if not isinstance(__snake_case			,							__snake_case      ):
          __A						:			List[Any]								=	f'Input value of [number={number}] must be an integer'
          raise TypeError(__snake_case      )

     if number < 1:
          __A						:			Union[str, Any]								=	f'Input value of [number={number}] must be > 0'
          raise ValueError(__snake_case      )
     elif number == 1:
          return 3
     elif number == 2:
          return 5
     else:
          __A						:			Optional[Any]								=	int(math.log(number // 3			,							2      )      ) + 2

          __A						:			Union[str, Any]								=	[3, 5]
          __A						:			List[Any]								=	2
          __A						:			Optional[Any]								=	3
          for block in range(1			,							__snake_case      ):
               for _ in range(__snake_case      ):
                    proth_list.append(2 ** (block + 1) + proth_list[proth_index - 1]      )
                    proth_index += 1
               increment *= 2

     return proth_list[number - 1]


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  for number in range(11):
    lowercase__   :				str      =   0
    try:
      lowercase__   :				List[str]      =   proth(number)
    except ValueError:
      print(f"""ValueError: there is no {number}th Proth number""")
      continue

    print(f"""The {number}th Proth number: {value}""")