






from __future__ import annotations

from collections.abc import Generator




def       _SCREAMING_SNAKE_CASE (							)				->						Generator[int, None, None]:
       _UpperCAmelCase							=    {}
       _UpperCAmelCase							=    2
       while True:
              _UpperCAmelCase							=    factor_map.pop(__snake_case   ,      __snake_case )
              if factor:
                     _UpperCAmelCase							=    factor + prime
                     while x in factor_map:
                            x += factor
                     _UpperCAmelCase							=    factor
              else:
                     _UpperCAmelCase							=    prime
                     yield prime
              prime += 1




def       _SCREAMING_SNAKE_CASE (							__snake_case = 1E10 )				->						int:
       _UpperCAmelCase							=    sieve()

       _UpperCAmelCase							=    1
       while True:
              _UpperCAmelCase							=    next(__snake_case )
              if (2 * prime * n) > limit:
                     return n
              # Ignore the next prime as the reminder will be 2.
              next(__snake_case )
              n += 2


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


import argparse

import torch

from transformers import BertConfig, BertForPreTraining, load_tf_weights_in_bert
from transformers.utils import logging


logging.set_verbosity_info()





def    __lowerCamelCase      (					UpperCamelCase__  ,				UpperCamelCase__  ,				UpperCamelCase__ ):







							'''simple docstring'''






							snake_case_     							=       BertConfig.from_json_file(UpperCamelCase__ )
							print(F'''Building PyTorch model from configuration: {config}''' )
							snake_case_     							=       BertForPreTraining(UpperCamelCase__ )

							# Load weights from tf checkpoint
							load_tf_weights_in_bert(UpperCamelCase__  ,				UpperCamelCase__  ,				UpperCamelCase__ )

							# Save pytorch-model
							print(F'''Save PyTorch model to {pytorch_dump_path}''' )
							torch.save(model.state_dict()  ,				UpperCamelCase__ )


if __name__ == "__main__":
					_UpperCAmelCase						:  Union[str, Any]									=			argparse.ArgumentParser()
					# Required parameters
					parser.add_argument(
					    """--tf_checkpoint_path""", default=None, type=str, required=True, help="""Path to the TensorFlow checkpoint path."""
					)
					parser.add_argument(
					    """--bert_config_file""",
					    default=None,
					    type=str,
					    required=True,
					    help=(
					        """The config json file corresponding to the pre-trained BERT model. \n"""
					        """This specifies the model architecture."""
					    ),
					)
					parser.add_argument(
					    """--pytorch_dump_path""", default=None, type=str, required=True, help="""Path to the output PyTorch model."""
					)
					_UpperCAmelCase						:  Any									=			parser.parse_args()
					convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.bert_config_file, args.pytorch_dump_path)




