

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   Any      ):



     '''simple docstring'''





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

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   Tuple      ):



     '''simple docstring'''





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

     lowercase__   :       Optional[int]				=	[]
     backtrack(0      )
     return output


if __name__ == "__main__":
       import doctest

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




from typing import Optional

import pyspark

from .. import Features, NamedSplit
from ..download import DownloadMode
from ..packaged_modules.spark.spark import Spark
from .abc import AbstractDatasetReader


class 				SCREAMING_SNAKE_CASE__ (__snake_case					):





    def __init__(				self						,       a						,       a = None						,       a = None						,       a = True						,       a = None						,       a = False						,       a = None						,       a = True						,       a = "arrow"						,       **a						,       ):
         super().__init__(
             split=a						,       features=a						,       cache_dir=a						,       keep_in_memory=a						,       streaming=a						,       **a						,       )
         lowercase__   :       Optional[int]				=	load_from_cache_file
         lowercase__   :       Optional[int]				=	file_format
         lowercase__   :       int				=	Spark(
             df=a						,       features=a						,       cache_dir=a						,       working_dir=a						,       **a						,       )





    def 				snake_case_    (				self):
         if self.streaming:
              return self.builder.as_streaming_dataset(split=self.split)
         lowercase__   :       Dict				=	None if self._load_from_cache_file else DownloadMode.FORCE_REDOWNLOAD
         self.builder.download_and_prepare(
             download_mode=a						,       file_format=self._file_format						,       )
         return self.builder.as_dataset(split=self.split)

