import operator





def 	__lowerCamelCase							(UpperCAmelCase__     :							str      , UpperCAmelCase__     :							Dict = False      , UpperCAmelCase__     :							Optional[int] = None  ):
					SCREAMING_SNAKE_CASE    			=       operator.lt if reverse else operator.gt
					SCREAMING_SNAKE_CASE    			=       solution or []

					if not arr:
										return solution

					SCREAMING_SNAKE_CASE    			=       [arr.pop(0  )]
					for i, item in enumerate(lowerCamelCase_  ):
										if _operator(lowerCamelCase_      , sublist[-1]  ):
															sublist.append(lowerCamelCase_  )
															arr.pop(lowerCamelCase_  )

    #  merging sublist into solution list
					if not solution:
										solution.extend(lowerCamelCase_  )
					else:
										while sublist:
															SCREAMING_SNAKE_CASE    			=       sublist.pop(0  )
															for i, xx in enumerate(lowerCamelCase_  ):
																				if not _operator(lowerCamelCase_      , lowerCamelCase_  ):
																									solution.insert(lowerCamelCase_      , lowerCamelCase_  )
																									break
															else:
																				solution.append(lowerCamelCase_  )

					strand_sort(lowerCamelCase_      , lowerCamelCase_      , lowerCamelCase_  )
					return solution


if __name__ == "__main__":
							assert strand_sort([4, 3, 5, 1, 2]) == [1, 2, 3, 4, 5]
							assert strand_sort([4, 3, 5, 1, 2], reverse=True) == [5, 4, 3, 2, 1]



from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


_lowerCamelCase					:   Tuple							=		{
    '''susnato/ernie-m-base_pytorch''': '''https://huggingface.co/susnato/ernie-m-base_pytorch/blob/main/config.json''',
    '''susnato/ernie-m-large_pytorch''': '''https://huggingface.co/susnato/ernie-m-large_pytorch/blob/main/config.json''',
}


class 						lowercase    (     a     ):
							lowercase__						:       Optional[Any]								=							"""ernie_m"""
							lowercase__						:       Dict[str, str]								=							{"dropout": "classifier_dropout", "num_classes": "num_labels"}




							def __init__(						self   :					Optional[int]	,							_UpperCamelCase   :					int = 250_002	,							_UpperCamelCase   :					int = 768	,							_UpperCamelCase   :					int = 12	,							_UpperCamelCase   :					int = 12	,							_UpperCamelCase   :					int = 3_072	,							_UpperCamelCase   :					str = "gelu"	,							_UpperCamelCase   :					float = 0.1	,							_UpperCamelCase   :					float = 0.1	,							_UpperCamelCase   :					int = 514	,							_UpperCamelCase   :					float = 0.0_2	,							_UpperCamelCase   :					int = 1	,							_UpperCamelCase   :					float = 1e-05	,							_UpperCamelCase   :					int=None	,							_UpperCamelCase   :					int=False	,							_UpperCamelCase   :					int=0.0	,							**_UpperCamelCase   :					Union[str, Any]	,							)					->				Optional[Any]:



												'''simple docstring'''

												super().__init__(pad_token_id=_UpperCamelCase	,							**_UpperCamelCase      )
												SCREAMING_SNAKE_CASE    			=       vocab_size
												SCREAMING_SNAKE_CASE    			=       hidden_size
												SCREAMING_SNAKE_CASE    			=       num_hidden_layers
												SCREAMING_SNAKE_CASE    			=       num_attention_heads
												SCREAMING_SNAKE_CASE    			=       intermediate_size
												SCREAMING_SNAKE_CASE    			=       hidden_act
												SCREAMING_SNAKE_CASE    			=       hidden_dropout_prob
												SCREAMING_SNAKE_CASE    			=       attention_probs_dropout_prob
												SCREAMING_SNAKE_CASE    			=       max_position_embeddings
												SCREAMING_SNAKE_CASE    			=       initializer_range
												SCREAMING_SNAKE_CASE    			=       layer_norm_eps
												SCREAMING_SNAKE_CASE    			=       classifier_dropout
												SCREAMING_SNAKE_CASE    			=       is_decoder
												SCREAMING_SNAKE_CASE    			=       act_dropout




