


'''simple docstring'''







from typing import Any


class 			__lowerCamelCase			:
    """simple docstring"""


    def __init__(  self      :							List[Any]				,							SCREAMING_SNAKE_CASE      :							Tuple):
           _A					:     Dict     = data
           _A					:     str     = None




class 			__lowerCamelCase			:
    """simple docstring"""


    def __init__(  self      :							Any):
           _A					:     Union[str, Any]     = None


    def        A   (  self      :							Any):
           _A					:     int     = self.head
           while temp is not None:
                  print(temp.data				,							end=' ')
                  _A					:     Optional[Any]     = temp.next
           print()


    def        A   (  self      :							List[Any]				,							SCREAMING_SNAKE_CASE      :							str):
           _A					:     int     = Node(_lowerCamelCase)
           _A					:     Any     = self.head
           _A					:     Any     = new_node


    def        A   (  self      :							Optional[Any]				,							SCREAMING_SNAKE_CASE      :							List[str]				,							SCREAMING_SNAKE_CASE      :							Optional[int]):
           if node_data_a == node_data_a:
                  return
           else:
                  _A					:     str     = self.head
                  while node_a is not None and node_a.data != node_data_a:
                         _A					:     Optional[int]     = node_a.next

                  _A					:     Union[str, Any]     = self.head
                  while node_a is not None and node_a.data != node_data_a:
                         _A					:     List[str]     = node_a.next

                  if node_a is None or node_a is None:
                         return

                  _A					:     Dict     = node_a.data, node_a.data


if __name__ == "__main__":
   A				:					Tuple      						=			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 operator as op


A				:					List[str]    						=			'''scaler.pt'''
A				:					Optional[int]    						=			'''pytorch_model'''
A				:					Union[str, Any]    						=			'''random_states'''
A				:					List[Any]    						=			'''optimizer'''
A				:					Optional[Any]    						=			'''scheduler'''
A				:					Optional[int]    						=			'''pytorch_model.bin'''
A				:					List[str]    						=			'''pytorch_model.bin.index.json'''
A				:					List[Any]    						=			'''model.safetensors'''
A				:					int    						=			'''model.safetensors.index.json'''
A				:					List[str]    						=			'''1.10.2'''
A				:					str    						=			'''py38'''
A				:					int    						=			'''4.17.0'''
A				:					Tuple    						=			['''ml.p3.16xlarge''', '''ml.p3dn.24xlarge''', '''ml.p4dn.24xlarge''']
A				:					Union[str, Any]    						=			['''FULL_SHARD''', '''SHARD_GRAD_OP''', '''NO_SHARD''', '''HYBRID_SHARD''', '''HYBRID_SHARD_ZERO2''']
A				:					Optional[Any]    						=			['''TRANSFORMER_BASED_WRAP''', '''SIZE_BASED_WRAP''', '''NO_WRAP''']
A				:					Dict    						=			['''BACKWARD_PRE''', '''BACKWARD_POST''', '''NO_PREFETCH''']
A				:					Any    						=			['''FULL_STATE_DICT''', '''LOCAL_STATE_DICT''', '''SHARDED_STATE_DICT''']
A				:					Tuple    						=			'''2.0.1'''
A				:					List[str]    						=			['''pdsh''', '''standard''', '''openmpi''', '''mvapich''']
A				:					Union[str, Any]    						=			['''default''', '''reduce-overhead''', '''max-autotune''']

A				:					List[Any]    						=			{'''>''': op.gt, '''>=''': op.ge, '''==''': op.eq, '''!=''': op.ne, '''<=''': op.le, '''<''': op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
A				:					Tuple    						=			[
    '''nnodes''',
    '''nproc_per_node''',
    '''rdzv_backend''',
    '''rdzv_endpoint''',
    '''rdzv_id''',
    '''rdzv_conf''',
    '''standalone''',
    '''max_restarts''',
    '''monitor_interval''',
    '''start_method''',
    '''role''',
    '''module''',
    '''m''',
    '''no_python''',
    '''run_path''',
    '''log_dir''',
    '''r''',
    '''redirects''',
    '''t''',
    '''tee''',
    '''node_rank''',
    '''master_addr''',
    '''master_port''',
]

A				:					List[str]    						=			['''DEEPSPEED''', '''MULTI_GPU''', '''FSDP''', '''MEGATRON_LM''']
A				:					Any    						=			['''DEEPSPEED''', '''MULTI_XPU''', '''FSDP''']






