



import pytest

import datasets.config
from datasets.utils.info_utils import is_small_dataset


@pytest.mark.parametrize('''dataset_size'''	,[None, 400 * 2**20, 600 * 2**20]					)
@pytest.mark.parametrize('''input_in_memory_max_size'''	,['''default''', 0, 100 * 2**20, 900 * 2**20]					)
def      UpperCamelCase(    __UpperCamelCase				:						str	,__UpperCamelCase				:						List[Any]	,__UpperCamelCase				:						Tuple					):
		if input_in_memory_max_size != "default":
				monkeypatch.setattr(datasets.config	,'''IN_MEMORY_MAX_SIZE'''	,__UpperCamelCase					)
		lowerCAmelCase_     :	Optional[int]							   =					datasets.config.IN_MEMORY_MAX_SIZE
		if input_in_memory_max_size == "default":
				assert in_memory_max_size == 0
		else:
				assert in_memory_max_size == input_in_memory_max_size
		if dataset_size and in_memory_max_size:
				lowerCAmelCase_     :	Any							   =					dataset_size < in_memory_max_size
		else:
				lowerCAmelCase_     :	Dict							   =					False
		lowerCAmelCase_     :	Any							   =					is_small_dataset(__UpperCamelCase					)
		assert result == expected







'''simple docstring'''
def 		A_(     A						:		list[int]):
							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 		A_(     A						:		str):

							def backtrack(A						:		str):
														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
						lowerCAmelCase					:    Dict           = permutea([1, 2, 3])
						print(res)
						doctest.testmod()




