"""simple docstring"""






import argparse

import torch

from transformers import RoFormerConfig, RoFormerForMaskedLM, load_tf_weights_in_roformer
from transformers.utils import logging


logging.set_verbosity_info()

def  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:Dict		,			_SCREAMING_SNAKE_CASE	:Optional[int]		,			_SCREAMING_SNAKE_CASE	:Dict  )				-> List[str]:
						# Initialise PyTorch model
						a_							:			Optional[Any]     		=					RoFormerConfig.from_json_file(_SCREAMING_SNAKE_CASE  )
						print(F'''Building PyTorch model from configuration: {config}'''  )
						a_							:			List[Any]     		=					RoFormerForMaskedLM(_SCREAMING_SNAKE_CASE  )

						# Load weights from tf checkpoint
						load_tf_weights_in_roformer(_SCREAMING_SNAKE_CASE		,			_SCREAMING_SNAKE_CASE		,			_SCREAMING_SNAKE_CASE  )

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


if __name__ == "__main__":
				UpperCamelCase     					=     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     					=     parser.parse_args()
				convert_tf_checkpoint_to_pytorch(args.tf_checkpoint_path, args.bert_config_file, args.pytorch_dump_path)





"""simple docstring"""






def  lowerCAmelCase_      (_SCREAMING_SNAKE_CASE	:int  )				-> Optional[int]:
						a_							:			List[Any]     		=					len(_SCREAMING_SNAKE_CASE  )
						for _ in range(
						    0		,			int(((no_of_elements - 1) / 2) + 1  )  ):  # we don't need to traverse to end of list as
												for j in range(0		,			no_of_elements - 1  ):
																		if (
																		    lst[j + 1] < lst[j]
																		):  # applying bubble sort algorithm from left to right (or forwards)
																								a_							:			List[str]     		=					lst[j + 1]
																								a_							:			Optional[Any]     		=					lst[j]
																								a_							:			Optional[Any]     		=					temp
																		if (
																		    lst[no_of_elements - 1 - j] < lst[no_of_elements - 2 - j]
																		):  # applying bubble sort algorithm from right to left (or backwards)
																								a_							:			Dict     		=					lst[no_of_elements - 1 - j]
																								a_							:			Dict     		=					lst[no_of_elements - 2 - j]
																								a_							:			Any     		=					temp
						return lst


if __name__ == "__main__":
				print('enter the list to be sorted')
				UpperCamelCase     					=     [int(x) for x in input().split()]  # inputing elements of the list in one line
				UpperCamelCase     					=     double_sort(lst)
				print('the sorted list is')
				print(sorted_lst)




