'''simple docstring'''






from typing import Any




class    a :



  """simple docstring"""







  def __init__(							self   ,    snake_case_					):

    '''simple docstring'''







    __UpperCAmelCase:					int		= data
    __UpperCAmelCase:					Union[str, Any]		= None




class    a :



  """simple docstring"""







  def __init__(							self					):

    '''simple docstring'''







    __UpperCAmelCase:					Any		= None







  def    lowercase_  (							self					):

    '''simple docstring'''







    __UpperCAmelCase:					Optional[Any]		= self.head
    while temp is not None:
      print(temp.data   ,    end=""" """					)
      __UpperCAmelCase:					List[str]		= temp.next
    print()







  def    lowercase_  (							self   ,    snake_case_					):

    '''simple docstring'''







    __UpperCAmelCase:					Optional[Any]		= Node(snake_case_					)
    __UpperCAmelCase:					Dict		= self.head
    __UpperCAmelCase:					List[Any]		= new_node







  def    lowercase_  (							self   ,    snake_case_   ,    snake_case_					):

    '''simple docstring'''







    if node_data_a == node_data_a:
      return
    else:
      __UpperCAmelCase:					Any		= self.head
      while node_a is not None and node_a.data != node_data_a:
        __UpperCAmelCase:					str		= node_a.next

      __UpperCAmelCase:					Dict		= self.head
      while node_a is not None and node_a.data != node_data_a:
        __UpperCAmelCase:					Optional[int]		= node_a.next

      if node_a is None or node_a is None:
        return

      __UpperCAmelCase:					Any		= node_a.data, node_a.data


if __name__ == "__main__":
    SCREAMING_SNAKE_CASE_	   =			LinkedList()
    for i in range(5, 0, -1):
        ll.push(i)

    ll.print_list()

    ll.swap_nodes(1, 4)
    print('After swapping')
    ll.print_list()
'''simple docstring'''






import argparse
import os

import torch

from transformers.utils import WEIGHTS_NAME


SCREAMING_SNAKE_CASE_	   =			['small', 'medium', 'large']

SCREAMING_SNAKE_CASE_	   =			'lm_head.decoder.weight'
SCREAMING_SNAKE_CASE_	   =			'lm_head.weight'






def  UpperCamelCase__					(					_lowercase    :				str   ,    _lowercase    :				str     )							->	List[str]:
  __UpperCAmelCase:					Tuple		= torch.load(_lowercase     )
  __UpperCAmelCase:					Tuple		= d.pop(_lowercase     )
  os.makedirs(_lowercase   ,    exist_ok=_lowercase     )
  torch.save(_lowercase   ,    os.path.join(_lowercase   ,    _lowercase     )     )


if __name__ == "__main__":
    SCREAMING_SNAKE_CASE_	   =			argparse.ArgumentParser()
    parser.add_argument('--dialogpt_path', default='.', type=str)
    SCREAMING_SNAKE_CASE_	   =			parser.parse_args()
    for MODEL in DIALOGPT_MODELS:
        SCREAMING_SNAKE_CASE_	   =			os.path.join(args.dialogpt_path, F"""{MODEL}_ft.pkl""")
        SCREAMING_SNAKE_CASE_	   =			F"""./DialoGPT-{MODEL}"""
        convert_dialogpt_checkpoint(
            checkpoint_path,
            pytorch_dump_folder_path,
        )