
"""simple docstring"""




from __future__ import annotations



def 							a__ (				lowerCAmelCase	:       list       ,    lowerCAmelCase	:       int       ,    lowerCAmelCase	:       int       ,    lowerCAmelCase	:       int		):






     '''simple docstring'''
     UpperCAmelCase__							: Any 							=						[]
     UpperCAmelCase__							: int 							=						input_list[low:mid], input_list[mid : high + 1]
     while left and right:
          result.append((left if left[0] <= right[0] else right).pop(0		)		)
     UpperCAmelCase__							: int 							=						result + left + right
     return input_list



def 							a__ (				lowerCAmelCase	:       list		):






     '''simple docstring'''
     if len(a_		) <= 1:
          return input_list
     UpperCAmelCase__							: List[str] 							=						list(a_		)

     # iteration for two-way merging
     UpperCAmelCase__							: Optional[int] 							=						2
     while p <= len(a_		):
          # getting low, high and middle value for merge-sort of single list
          for i in range(0       ,    len(a_		)       ,    a_		):
               UpperCAmelCase__							: List[str] 							=						i
               UpperCAmelCase__							: int 							=						i + p - 1
               UpperCAmelCase__							: Dict 							=						(low + high + 1) // 2
               UpperCAmelCase__							: Optional[Any] 							=						merge(a_       ,    a_       ,    a_       ,    a_		)
          # final merge of last two parts
          if p * 2 >= len(a_		):
               UpperCAmelCase__							: Dict 							=						i
               UpperCAmelCase__							: int 							=						merge(a_       ,    0       ,    a_       ,    len(a_		) - 1		)
               break
          p *= 2

     return input_list


if __name__ == "__main__":
    A__      :	Union[str, Any]          =    input("""Enter numbers separated by a comma:\n""").strip()
    if user_input == "":
        A__      :	Any          =    []
    else:
        A__      :	Dict          =    [int(item.strip()) for item in user_input.split(""",""")]
    print(iter_merge_sort(unsorted))





"""simple docstring"""




import argparse
import os

import torch

from transformers.utils import WEIGHTS_NAME


A__      :	Optional[int]          =    ["""small""", """medium""", """large"""]

A__      :	Optional[int]          =    """lm_head.decoder.weight"""
A__      :	Dict          =    """lm_head.weight"""



def 							a__ (				lowerCAmelCase	:       str       ,    lowerCAmelCase	:       str		):






     '''simple docstring'''
     UpperCAmelCase__							: Dict 							=						torch.load(lowerCAmelCase		)
     UpperCAmelCase__							: Optional[int] 							=						d.pop(lowerCAmelCase		)
     os.makedirs(lowerCAmelCase       ,    exist_ok=lowerCAmelCase		)
     torch.save(lowerCAmelCase       ,    os.path.join(lowerCAmelCase       ,    lowerCAmelCase		)		)


if __name__ == "__main__":
    A__      :	List[Any]          =    argparse.ArgumentParser()
    parser.add_argument("""--dialogpt_path""", default=""".""", type=str)
    A__      :	Tuple          =    parser.parse_args()
    for MODEL in DIALOGPT_MODELS:
        A__      :	Tuple          =    os.path.join(args.dialogpt_path, f"""{MODEL}_ft.pkl""")
        A__      :	str          =    f"""./DialoGPT-{MODEL}"""
        convert_dialogpt_checkpoint(
            checkpoint_path,
            pytorch_dump_folder_path,
        )



