





"""simple docstring"""






from typing import Any



class 	lowerCAmelCase					:






       def __init__(   self    ,  a__     ):
              _UpperCAmelCase     =     data
              _UpperCAmelCase     =     None



class 	lowerCAmelCase					:






       def __init__(   self     ):
              _UpperCAmelCase     =     None






       def 							__A (   self     ):
              _UpperCAmelCase     =     self.head
              while temp is not None:
                     print(temp.data    ,  end=' '     )
                     _UpperCAmelCase     =     temp.next
              print()






       def 							__A (   self    ,  a__     ):
              _UpperCAmelCase     =     Node(a__     )
              _UpperCAmelCase     =     self.head
              _UpperCAmelCase     =     new_node






       def 							__A (   self    ,  a__    ,  a__     ):
              if node_data_a == node_data_a:
                     return
              else:
                     _UpperCAmelCase     =     self.head
                     while node_a is not None and node_a.data != node_data_a:
                            _UpperCAmelCase     =     node_a.next

                     _UpperCAmelCase     =     self.head
                     while node_a is not None and node_a.data != node_data_a:
                            _UpperCAmelCase     =     node_a.next

                     if node_a is None or node_a is None:
                            return

                     _UpperCAmelCase    ,							_UpperCAmelCase     =     node_a.data, node_a.data


if __name__ == "__main__":
    lowerCAmelCase_			=							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"""






from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCAmelCase_			=							logging.get_logger(__name__)

lowerCAmelCase_			=							{
    '''microsoft/trocr-base-handwritten''': (
        '''https://huggingface.co/microsoft/trocr-base-handwritten/resolve/main/config.json'''
    ),
    # See all TrOCR models at https://huggingface.co/models?filter=trocr
}



class 	lowerCAmelCase					(      snake_case							):
       lowerCAmelCase__						 =  """trocr"""
       lowerCAmelCase__						 =  ["""past_key_values"""]
       lowerCAmelCase__						 =  {
           """num_attention_heads""": """decoder_attention_heads""",
           """hidden_size""": """d_model""",
           """num_hidden_layers""": """decoder_layers""",
       }






       def __init__(   self    ,  a__=5_02_65    ,  a__=10_24    ,  a__=12    ,  a__=16    ,  a__=40_96    ,  a__="gelu"    ,  a__=5_12    ,  a__=0.1    ,  a__=0.0    ,  a__=0.0    ,  a__=2    ,  a__=0.02    ,  a__=0.0    ,  a__=True    ,  a__=False    ,  a__=True    ,  a__=True    ,  a__=1    ,  a__=0    ,  a__=2    ,  **a__    ,  ):
              _UpperCAmelCase     =     vocab_size
              _UpperCAmelCase     =     d_model
              _UpperCAmelCase     =     decoder_layers
              _UpperCAmelCase     =     decoder_attention_heads
              _UpperCAmelCase     =     decoder_ffn_dim
              _UpperCAmelCase     =     activation_function
              _UpperCAmelCase     =     max_position_embeddings
              _UpperCAmelCase     =     dropout
              _UpperCAmelCase     =     attention_dropout
              _UpperCAmelCase     =     activation_dropout
              _UpperCAmelCase     =     init_std
              _UpperCAmelCase     =     decoder_layerdrop
              _UpperCAmelCase     =     use_cache
              _UpperCAmelCase     =     scale_embedding
              _UpperCAmelCase     =     use_learned_position_embeddings
              _UpperCAmelCase     =     layernorm_embedding

              super().__init__(
                  pad_token_id=a__    ,  bos_token_id=a__    ,  eos_token_id=a__    ,  decoder_start_token_id=a__    ,  **a__    ,  )






