
"""simple docstring"""



import pytest


_snake_case          =						'''__dummy_dataset1__'''

_snake_case          =						'''
import json
import os

import datasets


REPO_URL = "https://huggingface.co/datasets/albertvillanova/tests-raw-jsonl/resolve/main/"
URLS = {"train": REPO_URL + "wikiann-bn-train.jsonl", "validation": REPO_URL + "wikiann-bn-validation.jsonl"}


class __DummyDataset1__(datasets.GeneratorBasedBuilder):

    def _info(self):
        features = datasets.Features(
            {
                "tokens": datasets.Sequence(datasets.Value("string")),
                "ner_tags": datasets.Sequence(
                    datasets.features.ClassLabel(
                        names=[
                            "O",
                            "B-PER",
                            "I-PER",
                            "B-ORG",
                            "I-ORG",
                            "B-LOC",
                            "I-LOC",
                        ]
                    )
                ),
                "langs": datasets.Sequence(datasets.Value("string")),
                "spans": datasets.Sequence(datasets.Value("string")),
            }
        )
        return datasets.DatasetInfo(features=features)

    def _split_generators(self, dl_manager):
        dl_path = dl_manager.download(URLS)
        return [
            datasets.SplitGenerator(datasets.Split.TRAIN, gen_kwargs={"filepath": dl_path["train"]}),
            datasets.SplitGenerator(datasets.Split.VALIDATION, gen_kwargs={"filepath": dl_path["validation"]}),
        ]

    def _generate_examples(self, filepath):
        with open(filepath, "r", encoding="utf-8") as f:
            for i, line in enumerate(f):
                yield i, json.loads(line)
'''






@pytest.fixture
def 	__snake_case  (    ):






							"""simple docstring"""



							return DATASET_LOADING_SCRIPT_NAME






@pytest.fixture
def 	__snake_case  (    ):






							"""simple docstring"""



							return DATASET_LOADING_SCRIPT_CODE






@pytest.fixture
def 	__snake_case  (    SCREAMING_SNAKE_CASE:					List[str]     ,  SCREAMING_SNAKE_CASE:					Optional[int]     ,  SCREAMING_SNAKE_CASE:					List[str]						):






							"""simple docstring"""



							_lowerCAmelCase  	=			dataset_loading_script_name
							_lowerCAmelCase  	=			tmp_path / 'datasets' / script_name
							script_dir.mkdir(parents=SCREAMING_SNAKE_CASE						)
							_lowerCAmelCase  	=			script_dir / f"""{script_name}.py"""
							with open(SCREAMING_SNAKE_CASE     ,  'w'						) as f:
														f.write(SCREAMING_SNAKE_CASE						)
							return str(SCREAMING_SNAKE_CASE						)








"""simple docstring"""



def 	__snake_case  (    SCREAMING_SNAKE_CASE:					list[int]						):






							"""simple docstring"""



							_lowerCAmelCase  	=			[]
							if len(SCREAMING_SNAKE_CASE						) == 1:
														return [nums.copy()]
							for _ in range(len(SCREAMING_SNAKE_CASE						)						):
														_lowerCAmelCase  	=			nums.pop(0						)
														_lowerCAmelCase  	=			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:					Any						):






							"""simple docstring"""



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

							_lowerCAmelCase  	=			[]
							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()






