


'''simple docstring'''






def       _snake_case     (  A )		->					list[list[int]]:
							lowerCAmelCase__      =			[]
							if len(SCREAMING_SNAKE_CASE_ ) == 1:
														return [nums.copy()]
							for _ in range(len(SCREAMING_SNAKE_CASE_ ) ):
														lowerCAmelCase__      =			nums.pop(0 )
														lowerCAmelCase__      =			permute(SCREAMING_SNAKE_CASE_ )
														for perm in permutations:
																					perm.append(SCREAMING_SNAKE_CASE_ )
														result.extend(SCREAMING_SNAKE_CASE_ )
														nums.append(SCREAMING_SNAKE_CASE_ )
							return result


def       _snake_case     (  A )		->					Optional[Any]:

							def backtrack(A ):
														if start == len(SCREAMING_SNAKE_CASE_ ) - 1:
																					output.append(nums[:] )
														else:
																					for i in range(SCREAMING_SNAKE_CASE_				,					len(SCREAMING_SNAKE_CASE_ ) ):
																												lowerCAmelCase__      =			nums[i], nums[start]
																												backtrack(start + 1 )
																												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
		__UpperCAmelCase					       =							permutea([1, 2, 3])
		print(res)
		doctest.testmod()



'''simple docstring'''






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


__UpperCAmelCase					       =							logging.get_logger(__name__)

__UpperCAmelCase					       =							{'''ctrl''': '''https://huggingface.co/ctrl/resolve/main/config.json'''}




class 	a__       (							a__						):





							'''simple docstring'''






							lowercase__    :     Dict					=   "ctrl"
							lowercase__    :     str					=   ["past_key_values"]
							lowercase__    :     Optional[int]					=   {
							    "max_position_embeddings": "n_positions",
							    "hidden_size": "n_embd",
							    "num_attention_heads": "n_head",
							    "num_hidden_layers": "n_layer",
							}







							def __init__(	self      ,					lowerCamelCase_=24_65_34      ,					lowerCamelCase_=2_56      ,					lowerCamelCase_=12_80      ,					lowerCamelCase_=81_92      ,					lowerCamelCase_=48      ,					lowerCamelCase_=16      ,					lowerCamelCase_=0.1      ,					lowerCamelCase_=0.1      ,					lowerCamelCase_=1e-6      ,					lowerCamelCase_=0.02      ,					lowerCamelCase_=True      ,					**lowerCamelCase_      ,					) ->							Union[str, Any]:
														lowerCAmelCase__      =			vocab_size
														lowerCAmelCase__      =			n_positions
														lowerCAmelCase__      =			n_embd
														lowerCAmelCase__      =			n_layer
														lowerCAmelCase__      =			n_head
														lowerCAmelCase__      =			dff
														lowerCAmelCase__      =			resid_pdrop
														lowerCAmelCase__      =			embd_pdrop
														lowerCAmelCase__      =			layer_norm_epsilon
														lowerCAmelCase__      =			initializer_range

														lowerCAmelCase__      =			use_cache

														super().__init__(**lowerCamelCase_     )