

def       __snake_case						( __UpperCamelCase	: list[int]    ):



      """simple docstring"""

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

def       __snake_case						( __UpperCamelCase	: Dict    ):



      """simple docstring"""

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

      A_						  =				[]
      backtrack(0    )
      return output


if __name__ == "__main__":
      import doctest

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







'''simple docstring'''



SCREAMING_SNAKE_CASE							=						frozenset(
    [
        'prompt',
        'height',
        'width',
        'guidance_scale',
        'negative_prompt',
        'prompt_embeds',
        'negative_prompt_embeds',
        'cross_attention_kwargs',
    ]
)

SCREAMING_SNAKE_CASE							=						frozenset(['prompt', 'negative_prompt'])

SCREAMING_SNAKE_CASE							=						frozenset([])

SCREAMING_SNAKE_CASE							=						frozenset(['image'])

SCREAMING_SNAKE_CASE							=						frozenset(
    [
        'image',
        'height',
        'width',
        'guidance_scale',
    ]
)

SCREAMING_SNAKE_CASE							=						frozenset(['image'])

SCREAMING_SNAKE_CASE							=						frozenset(
    [
        'prompt',
        'image',
        'height',
        'width',
        'guidance_scale',
        'negative_prompt',
        'prompt_embeds',
        'negative_prompt_embeds',
    ]
)

SCREAMING_SNAKE_CASE							=						frozenset(['prompt', 'image', 'negative_prompt'])

SCREAMING_SNAKE_CASE							=						frozenset(
    [
        # Text guided image variation with an image mask
        'prompt',
        'image',
        'mask_image',
        'height',
        'width',
        'guidance_scale',
        'negative_prompt',
        'prompt_embeds',
        'negative_prompt_embeds',
    ]
)

SCREAMING_SNAKE_CASE							=						frozenset(['prompt', 'image', 'mask_image', 'negative_prompt'])

SCREAMING_SNAKE_CASE							=						frozenset(
    [
        # image variation with an image mask
        'image',
        'mask_image',
        'height',
        'width',
        'guidance_scale',
    ]
)

SCREAMING_SNAKE_CASE							=						frozenset(['image', 'mask_image'])

SCREAMING_SNAKE_CASE							=						frozenset(
    [
        'example_image',
        'image',
        'mask_image',
        'height',
        'width',
        'guidance_scale',
    ]
)

SCREAMING_SNAKE_CASE							=						frozenset(['example_image', 'image', 'mask_image'])

SCREAMING_SNAKE_CASE							=						frozenset(['class_labels'])

SCREAMING_SNAKE_CASE							=						frozenset(['class_labels'])

SCREAMING_SNAKE_CASE							=						frozenset(['batch_size'])

SCREAMING_SNAKE_CASE							=						frozenset([])

SCREAMING_SNAKE_CASE							=						frozenset(['batch_size'])

SCREAMING_SNAKE_CASE							=						frozenset([])

SCREAMING_SNAKE_CASE							=						frozenset(
    [
        'prompt',
        'audio_length_in_s',
        'guidance_scale',
        'negative_prompt',
        'prompt_embeds',
        'negative_prompt_embeds',
        'cross_attention_kwargs',
    ]
)

SCREAMING_SNAKE_CASE							=						frozenset(['prompt', 'negative_prompt'])
SCREAMING_SNAKE_CASE							=						frozenset(['input_tokens'])

SCREAMING_SNAKE_CASE							=						frozenset(['input_tokens'])



