
import pytest


lowercase__          ='__dummy_dataset1__'

lowercase__          ='\nimport json\nimport os\n\nimport datasets\n\n\nREPO_URL = "https://huggingface.co/datasets/albertvillanova/tests-raw-jsonl/resolve/main/"\nURLS = {"train": REPO_URL + "wikiann-bn-train.jsonl", "validation": REPO_URL + "wikiann-bn-validation.jsonl"}\n\n\nclass __DummyDataset1__(datasets.GeneratorBasedBuilder):\n\n    def _info(self):\n        features = datasets.Features(\n            {\n                "tokens": datasets.Sequence(datasets.Value("string")),\n                "ner_tags": datasets.Sequence(\n                    datasets.features.ClassLabel(\n                        names=[\n                            "O",\n                            "B-PER",\n                            "I-PER",\n                            "B-ORG",\n                            "I-ORG",\n                            "B-LOC",\n                            "I-LOC",\n                        ]\n                    )\n                ),\n                "langs": datasets.Sequence(datasets.Value("string")),\n                "spans": datasets.Sequence(datasets.Value("string")),\n            }\n        )\n        return datasets.DatasetInfo(features=features)\n\n    def _split_generators(self, dl_manager):\n        dl_path = dl_manager.download(URLS)\n        return [\n            datasets.SplitGenerator(datasets.Split.TRAIN, gen_kwargs={"filepath": dl_path["train"]}),\n            datasets.SplitGenerator(datasets.Split.VALIDATION, gen_kwargs={"filepath": dl_path["validation"]}),\n        ]\n\n    def _generate_examples(self, filepath):\n        with open(filepath, "r", encoding="utf-8") as f:\n            for i, line in enumerate(f):\n                yield i, json.loads(line)\n'




@pytest.fixture
def        __UpperCamelCase					(    ):
 return DATASET_LOADING_SCRIPT_NAME




@pytest.fixture
def        __UpperCamelCase					(    ):
 return DATASET_LOADING_SCRIPT_CODE




@pytest.fixture
def        __UpperCamelCase					(    lowerCAmelCase__							:    Tuple  ,       lowerCAmelCase__							:    Optional[int]  ,       lowerCAmelCase__							:    Tuple  ):
 __a			:  str		    =  dataset_loading_script_name
 __a			:  List[Any]		    =  tmp_path / '''datasets''' / script_name
 script_dir.mkdir(parents=lowerCAmelCase__  )
 __a			:  Dict		    =  script_dir / f"{script_name}.py"
 with open(lowerCAmelCase__  ,       '''w'''  ) as f:
  f.write(lowerCAmelCase__  )
 return str(lowerCAmelCase__  )


def        __UpperCamelCase					(    lowerCAmelCase__							:    str  ,       lowerCAmelCase__							:    str  ):
 __a			:  Any		    =  len(lowerCAmelCase__  )
 __a			:  Union[str, Any]		    =  []
 for i in range(len(lowerCAmelCase__  ) - pat_len + 1  ):
  __a			:  List[Any]		    =  True
  for j in range(lowerCAmelCase__  ):
   if s[i + j] != pattern[j]:
    __a			:  Union[str, Any]		    =  False
    break
  if match_found:
   position.append(lowerCAmelCase__  )
 return position


if __name__ == "__main__":
      assert naive_pattern_search('ABCDEFG', 'DE') == [3]
      print(naive_pattern_search('ABAAABCDBBABCDDEBCABC', 'ABC'))
