


def     __lowerCamelCase						(			UpperCAmelCase_						:		list[int]						):




      """simple docstring"""





      a						:str										=	[]
      if len(UpperCAmelCase_						) == 1:
            return [nums.copy()]
      for _ in range(len(UpperCAmelCase_						)						):
            a						:str										=	nums.pop(0						)
            a						:Tuple										=	permute(UpperCAmelCase_						)
            for perm in permutations:
                  perm.append(UpperCAmelCase_						)
            result.extend(UpperCAmelCase_						)
            nums.append(UpperCAmelCase_						)
      return result
def     __lowerCamelCase						(			UpperCAmelCase_						:		List[str]						):




      """simple docstring"""





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

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


if __name__ == "__main__":
     import doctest

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









from ...utils import (
    OptionalDependencyNotAvailable,
    is_flax_available,
    is_torch_available,
    is_transformers_available,
)


try:
     if not (is_transformers_available() and is_torch_available()):
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
     from .multicontrolnet import MultiControlNetModel
     from .pipeline_controlnet import StableDiffusionControlNetPipeline
     from .pipeline_controlnet_imgaimg import StableDiffusionControlNetImgaImgPipeline
     from .pipeline_controlnet_inpaint import StableDiffusionControlNetInpaintPipeline


if is_transformers_available() and is_flax_available():
     from .pipeline_flax_controlnet import FlaxStableDiffusionControlNetPipeline





