




def        __UpperCAmelCase						(							lowerCamelCase_ :     list[int]  )       ->  list[list[int]]:







			"""simple docstring"""





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





def        __UpperCAmelCase						(							lowerCamelCase_ :     Optional[Any]  )       ->  List[Any]:







			"""simple docstring"""





			def backtrack(lowerCamelCase_ :     str  ):
						if start == len(lowerCamelCase_  ) - 1:
									output.append(nums[:]  )
						else:
									for i in range(lowerCamelCase_  ,							len(lowerCamelCase_  )  ):
												SCREAMING_SNAKE_CASE_  ,    SCREAMING_SNAKE_CASE_   : Tuple					  =      nums[i], nums[start]
												backtrack(start + 1  )
												SCREAMING_SNAKE_CASE_  ,    SCREAMING_SNAKE_CASE_   : int					  =      nums[i], nums[start]  # backtrack

			SCREAMING_SNAKE_CASE_   : List[Any]					  =      []
			backtrack(0  )
			return output


if __name__ == "__main__":
						import doctest

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









from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


UpperCamelCase__ :   Optional[int]						=							{
    '''configuration_bloom''': ['''BLOOM_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''BloomConfig''', '''BloomOnnxConfig'''],
}
try:
						if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						UpperCamelCase__ :   Tuple						=							['''BloomTokenizerFast''']

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						UpperCamelCase__ :   Any						=							[
						    '''BLOOM_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''BloomForCausalLM''',
						    '''BloomModel''',
						    '''BloomPreTrainedModel''',
						    '''BloomForSequenceClassification''',
						    '''BloomForTokenClassification''',
						    '''BloomForQuestionAnswering''',
						]

if TYPE_CHECKING:
						from .configuration_bloom import BLOOM_PRETRAINED_CONFIG_ARCHIVE_MAP, BloomConfig, BloomOnnxConfig

						try:
												if not is_tokenizers_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_bloom_fast import BloomTokenizerFast

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_bloom import (
												    BLOOM_PRETRAINED_MODEL_ARCHIVE_LIST,
												    BloomForCausalLM,
												    BloomForQuestionAnswering,
												    BloomForSequenceClassification,
												    BloomForTokenClassification,
												    BloomModel,
												    BloomPreTrainedModel,
												)

else:
						import sys

						UpperCamelCase__ :   Tuple						=							_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



