





"""simple docstring"""





import argparse

from transformers import ConvBertConfig, ConvBertModel, TFConvBertModel, load_tf_weights_in_convbert
from transformers.utils import logging


logging.set_verbosity_info()




def 		lowerCAmelCase_     (  lowercase_       :							List[str]			,				lowercase_       :							Optional[int]			,				lowercase_       :							str		):

 '''simple docstring'''






 __SCREAMING_SNAKE_CASE			:      int 							=	ConvBertConfig.from_json_file(lowercase_		)
 __SCREAMING_SNAKE_CASE			:      Any 							=	ConvBertModel(lowercase_		)

 __SCREAMING_SNAKE_CASE			:      Tuple 							=	load_tf_weights_in_convbert(lowercase_			,				lowercase_			,				lowercase_		)
 model.save_pretrained(lowercase_		)

 __SCREAMING_SNAKE_CASE			:      List[str] 							=	TFConvBertModel.from_pretrained(lowercase_			,				from_pt=lowercase_		)
 tf_model.save_pretrained(lowercase_		)


if __name__ == "__main__":
    _lowerCamelCase  					=     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(
        '''--convbert_config_file''',
        default=None,
        type=str,
        required=True,
        help=(
            '''The config json file corresponding to the pre-trained ConvBERT 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.'''
    )
    _lowerCamelCase  					=     parser.parse_args()
    convert_orig_tfa_checkpoint_to_pytorch(args.tf_checkpoint_path, args.convbert_config_file, args.pytorch_dump_path)








"""simple docstring"""





def 		lowerCAmelCase_     (  lowercase_       :							Tuple			,				lowercase_       :							Any			,				lowercase_       :							List[str]		):

 '''simple docstring'''






 __SCREAMING_SNAKE_CASE			:      Any 							=	index
 __SCREAMING_SNAKE_CASE			:      Union[str, Any] 							=	2 * index + 1
 __SCREAMING_SNAKE_CASE			:      Any 							=	2 * index + 2
 if left_index < heap_size and unsorted[left_index] > unsorted[largest]:
  __SCREAMING_SNAKE_CASE			:      str 							=	left_index

 if right_index < heap_size and unsorted[right_index] > unsorted[largest]:
  __SCREAMING_SNAKE_CASE			:      Optional[Any] 							=	right_index

 if largest != index:
  __SCREAMING_SNAKE_CASE							,				__SCREAMING_SNAKE_CASE			:      List[str] 							=	unsorted[index], unsorted[largest]
  heapify(lowercase_			,				lowercase_			,				lowercase_		)




def 		lowerCAmelCase_     (  lowercase_       :							List[Any]		):

 '''simple docstring'''






 __SCREAMING_SNAKE_CASE			:      Dict 							=	len(lowercase_		)
 for i in range(n // 2 - 1			,				-1			,				-1		):
  heapify(lowercase_			,				lowercase_			,				lowercase_		)
 for i in range(n - 1			,				0			,				-1		):
  __SCREAMING_SNAKE_CASE							,				__SCREAMING_SNAKE_CASE			:      List[Any] 							=	unsorted[i], unsorted[0]
  heapify(lowercase_			,				0			,				lowercase_		)
 return unsorted


if __name__ == "__main__":
    _lowerCamelCase  					=     input('''Enter numbers separated by a comma:\n''').strip()
    _lowerCamelCase  					=     [int(item) for item in user_input.split(''',''')]
    print(heap_sort(unsorted))

