
def      lowerCamelCase__       (       __lowerCAmelCase						:						list[int]       ):




			"""simple docstring"""


			lowerCAmelCase_      			=			[]
			if len(__lowerCAmelCase       ) == 1:
						return [nums.copy()]
			for _ in range(len(__lowerCAmelCase       )       ):
						lowerCAmelCase_      			=			nums.pop(0       )
						lowerCAmelCase_      			=			permute(__lowerCAmelCase       )
						for perm in permutations:
									perm.append(__lowerCAmelCase       )
						result.extend(__lowerCAmelCase       )
						nums.append(__lowerCAmelCase       )
			return result






def      lowerCamelCase__       (       __lowerCAmelCase						:						str       ):




			"""simple docstring"""


			def backtrack(__lowerCAmelCase						:						Dict       ):
						if start == len(__lowerCAmelCase       ) - 1:
									output.append(nums[:]       )
						else:
									for i in range(__lowerCAmelCase					,							len(__lowerCAmelCase       )       ):
												lowerCAmelCase_			,						lowerCAmelCase_      			=			nums[i], nums[start]
												backtrack(start + 1       )
												lowerCAmelCase_			,						lowerCAmelCase_      			=			nums[i], nums[start]  # backtrack

			lowerCAmelCase_      			=			[]
			backtrack(0       )
			return output


if __name__ == "__main__":
			import doctest

			# use res to print the data in permute2 function
			_A     =  permutea([1, 2, 3])
			print(res)
			doctest.testmod()





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


_A     =  logging.get_logger(__name__)

_A     =  {
    "transfo-xl-wt103": "https://huggingface.co/transfo-xl-wt103/resolve/main/config.json",
}





class 			_lowerCAmelCase      (			__a ):
				_lowercase    	='''transfo-xl'''
				_lowercase    	=['''mems''']
				_lowercase    	={
				    '''n_token''': '''vocab_size''',
				    '''hidden_size''': '''d_model''',
				    '''num_attention_heads''': '''n_head''',
				    '''num_hidden_layers''': '''n_layer''',
				}




				def __init__(      self       ,       _UpperCamelCase=267_735       ,       _UpperCamelCase=[20_000, 40_000, 200_000]       ,       _UpperCamelCase=1_024       ,       _UpperCamelCase=1_024       ,       _UpperCamelCase=16       ,       _UpperCamelCase=64       ,       _UpperCamelCase=4_096       ,       _UpperCamelCase=4       ,       _UpperCamelCase=False       ,       _UpperCamelCase=18       ,       _UpperCamelCase=1_600       ,       _UpperCamelCase=1_000       ,       _UpperCamelCase=True       ,       _UpperCamelCase=True       ,       _UpperCamelCase=0       ,       _UpperCamelCase=-1       ,       _UpperCamelCase=True       ,       _UpperCamelCase=0.1       ,       _UpperCamelCase=0.0       ,       _UpperCamelCase=True       ,       _UpperCamelCase="normal"       ,       _UpperCamelCase=0.01       ,       _UpperCamelCase=0.01       ,       _UpperCamelCase=0.02       ,       _UpperCamelCase=1e-5       ,       _UpperCamelCase=0       ,       **_UpperCamelCase       ,       )       ->   Dict:
							lowerCAmelCase_      			=			vocab_size
							lowerCAmelCase_      			=			[]
							self.cutoffs.extend(_UpperCamelCase  )
							if proj_share_all_but_first:
										lowerCAmelCase_      			=			[False] + [True] * len(self.cutoffs  )
							else:
										lowerCAmelCase_      			=			[False] + [False] * len(self.cutoffs  )
							lowerCAmelCase_      			=			d_model
							lowerCAmelCase_      			=			d_embed
							lowerCAmelCase_      			=			d_head
							lowerCAmelCase_      			=			d_inner
							lowerCAmelCase_      			=			div_val
							lowerCAmelCase_      			=			pre_lnorm
							lowerCAmelCase_      			=			n_layer
							lowerCAmelCase_      			=			n_head
							lowerCAmelCase_      			=			mem_len
							lowerCAmelCase_      			=			same_length
							lowerCAmelCase_      			=			attn_type
							lowerCAmelCase_      			=			clamp_len
							lowerCAmelCase_      			=			sample_softmax
							lowerCAmelCase_      			=			adaptive
							lowerCAmelCase_      			=			dropout
							lowerCAmelCase_      			=			dropatt
							lowerCAmelCase_      			=			untie_r
							lowerCAmelCase_      			=			init
							lowerCAmelCase_      			=			init_range
							lowerCAmelCase_      			=			proj_init_std
							lowerCAmelCase_      			=			init_std
							lowerCAmelCase_      			=			layer_norm_epsilon
							super().__init__(eos_token_id=_UpperCamelCase       ,       **_UpperCamelCase  )




				@property
				def   __a		(      self  )       ->   List[Any]:
							# Message copied from Transformer-XL documentation
							logger.info(f"""The model {self.model_type} is one of the few models that has no sequence length limit."""  )
							return -1




				@max_position_embeddings.setter
				def   __a		(      self       ,       _UpperCamelCase  )       ->   str:
							# Message copied from Transformer-XL documentation
							raise NotImplementedError(
							    f"""The model {self.model_type} is one of the few models that has no sequence length limit."""  )



