

"""simple docstring"""




import os

from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE, hf_cache_home


__UpperCAmelCase =				HUGGINGFACE_HUB_CACHE


__UpperCAmelCase =				'config.json'
__UpperCAmelCase =				'diffusion_pytorch_model.bin'
__UpperCAmelCase =				'diffusion_flax_model.msgpack'
__UpperCAmelCase =				'model.onnx'
__UpperCAmelCase =				'diffusion_pytorch_model.safetensors'
__UpperCAmelCase =				'weights.pb'
__UpperCAmelCase =				'https://huggingface.co'
__UpperCAmelCase =				default_cache_path
__UpperCAmelCase =				'diffusers_modules'
__UpperCAmelCase =				os.getenv('HF_MODULES_CACHE', os.path.join(hf_cache_home, 'modules'))
__UpperCAmelCase =				['fp16', 'non-ema']
__UpperCAmelCase =				'.self_attn'








"""simple docstring"""




def   lowerCAmelCase						(					__UpperCamelCase      ):
 '''simple docstring'''





 UpperCAmelCase__					:  str					   =					[]
 if len(__UpperCamelCase      ) == 1:
  return [nums.copy()]
 for _ in range(len(__UpperCamelCase      )      ):
  UpperCAmelCase__					:  Tuple					   =					nums.pop(0      )
  UpperCAmelCase__					:  List[str]					   =					permute(__UpperCamelCase      )
  for perm in permutations:
   perm.append(__UpperCamelCase      )
  result.extend(__UpperCamelCase      )
  nums.append(__UpperCamelCase      )
 return result
def   lowerCAmelCase						(					__UpperCamelCase      ):
 '''simple docstring'''





 def backtrack(__UpperCamelCase      ):
  if start == len(__UpperCamelCase      ) - 1:
   output.append(nums[:]      )
  else:
   for i in range(__UpperCamelCase							,    len(__UpperCamelCase      )      ):
    UpperCAmelCase__   ,      UpperCAmelCase__					:  Union[str, Any]					   =					nums[i], nums[start]
    backtrack(start + 1      )
    UpperCAmelCase__   ,      UpperCAmelCase__					:  Union[str, Any]					   =					nums[i], nums[start]  # backtrack

 UpperCAmelCase__					:  List[str]					   =					[]
 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()





