


def 				lowerCamelCase__				(	A       :      list[int]					):




						'''simple docstring'''






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


def 				lowerCamelCase__				(	A       :      Dict					):




						'''simple docstring'''






						def backtrack(A       :      List[Any]					):
												if start == len(A					) - 1:
																		output.append(nums[:]					)
												else:
																		for i in range(A				,       len(A					)					):
																								UpperCAmelCase    ,    UpperCAmelCase					    =     nums[i], nums[start]
																								backtrack(start + 1					)
																								UpperCAmelCase    ,    UpperCAmelCase					    =     nums[i], nums[start]  # backtrack

						UpperCAmelCase					    =     []
						backtrack(0					)
						return output


if __name__ == "__main__":
	import doctest

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









'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowercase      :      List[str]            =					{
    """configuration_time_series_transformer""": [
        """TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """TimeSeriesTransformerConfig""",
    ],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_lowercase      :      Dict            =					[
	    """TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """TimeSeriesTransformerForPrediction""",
	    """TimeSeriesTransformerModel""",
	    """TimeSeriesTransformerPreTrainedModel""",
	]


if TYPE_CHECKING:
	from .configuration_time_series_transformer import (
	    TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    TimeSeriesTransformerConfig,
	)

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_time_series_transformer import (
		    TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TimeSeriesTransformerForPrediction,
		    TimeSeriesTransformerModel,
		    TimeSeriesTransformerPreTrainedModel,
		)

else:
	import sys

	_lowercase      :      Tuple            =					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





