




def 					UpperCAmelCase_							(      __UpperCAmelCase						:	str							)					-> str:
      if not all(char in '01' for char in bin_string							):
            raise ValueError('Non-binary value was passed to the function'							)
      if not bin_string:
            raise ValueError('Empty string was passed to the function'							)
      SCREAMING_SNAKE_CASE_							=			''
      while len(__UpperCAmelCase							) % 3 != 0:
            SCREAMING_SNAKE_CASE_							=			'0' + bin_string
      SCREAMING_SNAKE_CASE_							=			[
          bin_string[index : index + 3]
          for index in range(len(__UpperCAmelCase							)							)
          if index % 3 == 0
      ]
      for bin_group in bin_string_in_3_list:
            SCREAMING_SNAKE_CASE_							=			0
            for index, val in enumerate(__UpperCAmelCase							):
                  oct_val += int(2 ** (2 - index) * int(__UpperCAmelCase							)							)
            oct_string += str(__UpperCAmelCase							)
      return oct_string


if __name__ == "__main__":
   from doctest import testmod

   testmod()





import contextlib
import csv
import json
import os
import sqlitea
import tarfile
import textwrap
import zipfile

import pyarrow as pa
import pyarrow.parquet as pq
import pytest

import datasets
import datasets.config

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      )					-> str:
      SCREAMING_SNAKE_CASE_							=			10
      SCREAMING_SNAKE_CASE_							=			datasets.Features(
          {
              'tokens': datasets.Sequence(datasets.Value('string'							)							),
              'labels': datasets.Sequence(datasets.ClassLabel(names=['negative', 'positive']							)							),
              'answers': datasets.Sequence(
                  {
                      'text': datasets.Value('string'							),
                      'answer_start': datasets.Value('int32'							),
                  }							),
              'id': datasets.Value('int64'							),
          }							)
      SCREAMING_SNAKE_CASE_							=			datasets.Dataset.from_dict(
          {
              'tokens': [['foo'] * 5] * n,
              'labels': [[1] * 5] * n,
              'answers': [{'answer_start': [97], 'text': ['1976']}] * 10,
              'id': list(range(__UpperCAmelCase							)							),
          }			,			features=__UpperCAmelCase			,			)
      return dataset

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Tuple			,			__UpperCAmelCase						:	str							)					-> int:
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'file.arrow'							)
      dataset.map(cache_file_name=__UpperCAmelCase							)
      return filename


# FILE_CONTENT + files


lowerCamelCase__ :   List[Any]					=							'\\n    Text data.\n    Second line of data.'

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Any							)					-> List[str]:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'file.txt'
      SCREAMING_SNAKE_CASE_							=			FILE_CONTENT
      with open(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase							)
      return filename

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Dict							)					-> List[str]:
      import bza

      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'file.txt.bz2'
      SCREAMING_SNAKE_CASE_							=			bytes(__UpperCAmelCase			,			'utf-8'							)
      with bza.open(__UpperCAmelCase			,			'wb'							) as f:
            f.write(__UpperCAmelCase							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	List[Any]							)					-> Any:
      import gzip

      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'file.txt.gz'							)
      SCREAMING_SNAKE_CASE_							=			bytes(__UpperCAmelCase			,			'utf-8'							)
      with gzip.open(__UpperCAmelCase			,			'wb'							) as f:
            f.write(__UpperCAmelCase							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	List[str]							)					-> int:
      if datasets.config.LZ4_AVAILABLE:
            import lza.frame

            SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'file.txt.lz4'
            SCREAMING_SNAKE_CASE_							=			bytes(__UpperCAmelCase			,			'utf-8'							)
            with lza.frame.open(__UpperCAmelCase			,			'wb'							) as f:
                  f.write(__UpperCAmelCase							)
            return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	List[Any]			,			__UpperCAmelCase						:	Union[str, Any]							)					-> Any:
      if datasets.config.PY7ZR_AVAILABLE:
            import pyazr

            SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'file.txt.7z'
            with pyazr.SevenZipFile(__UpperCAmelCase			,			'w'							) as archive:
                  archive.write(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							)							)
            return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Dict			,			__UpperCAmelCase						:	str							)					-> str:
      import tarfile

      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'file.txt.tar'
      with tarfile.TarFile(__UpperCAmelCase			,			'w'							) as f:
            f.add(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	str							)					-> List[Any]:
      import lzma

      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'file.txt.xz'
      SCREAMING_SNAKE_CASE_							=			bytes(__UpperCAmelCase			,			'utf-8'							)
      with lzma.open(__UpperCAmelCase			,			'wb'							) as f:
            f.write(__UpperCAmelCase							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Dict			,			__UpperCAmelCase						:	Dict							)					-> str:
      import zipfile

      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'file.txt.zip'
      with zipfile.ZipFile(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Dict							)					-> Any:
      if datasets.config.ZSTANDARD_AVAILABLE:
            import zstandard as zstd

            SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'file.txt.zst'
            SCREAMING_SNAKE_CASE_							=			bytes(__UpperCAmelCase			,			'utf-8'							)
            with zstd.open(__UpperCAmelCase			,			'wb'							) as f:
                  f.write(__UpperCAmelCase							)
            return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	int							)					-> List[Any]:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'file.xml'
      SCREAMING_SNAKE_CASE_							=			textwrap.dedent(
          '\\n    <?xml version="1.0" encoding="UTF-8" ?>\n    <tmx version="1.4">\n      <header segtype="sentence" srclang="ca" />\n      <body>\n        <tu>\n          <tuv xml:lang="ca"><seg>Contingut 1</seg></tuv>\n          <tuv xml:lang="en"><seg>Content 1</seg></tuv>\n        </tu>\n        <tu>\n          <tuv xml:lang="ca"><seg>Contingut 2</seg></tuv>\n          <tuv xml:lang="en"><seg>Content 2</seg></tuv>\n        </tu>\n        <tu>\n          <tuv xml:lang="ca"><seg>Contingut 3</seg></tuv>\n          <tuv xml:lang="en"><seg>Content 3</seg></tuv>\n        </tu>\n        <tu>\n          <tuv xml:lang="ca"><seg>Contingut 4</seg></tuv>\n          <tuv xml:lang="en"><seg>Content 4</seg></tuv>\n        </tu>\n        <tu>\n          <tuv xml:lang="ca"><seg>Contingut 5</seg></tuv>\n          <tuv xml:lang="en"><seg>Content 5</seg></tuv>\n        </tu>\n      </body>\n    </tmx>'							)
      with open(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase							)
      return filename


lowerCamelCase__ :   Optional[Any]					=							[
    {'col_1': '0', 'col_2': 0, 'col_3': 0.0},
    {'col_1': '1', 'col_2': 1, 'col_3': 1.0},
    {'col_1': '2', 'col_2': 2, 'col_3': 2.0},
    {'col_1': '3', 'col_2': 3, 'col_3': 3.0},
]
lowerCamelCase__ :   Dict					=							[
    {'col_1': '4', 'col_2': 4, 'col_3': 4.0},
    {'col_1': '5', 'col_2': 5, 'col_3': 5.0},
]
lowerCamelCase__ :   Optional[int]					=							{
    'col_1': ['0', '1', '2', '3'],
    'col_2': [0, 1, 2, 3],
    'col_3': [0.0, 1.0, 2.0, 3.0],
}

lowerCamelCase__ :   List[Any]					=							[
    {'col_3': 0.0, 'col_1': '0', 'col_2': 0},
    {'col_3': 1.0, 'col_1': '1', 'col_2': 1},
]

lowerCamelCase__ :   List[Any]					=							[
    {'col_1': 's0', 'col_2': 0, 'col_3': 0.0},
    {'col_1': 's1', 'col_2': 1, 'col_3': 1.0},
    {'col_1': 's2', 'col_2': 2, 'col_3': 2.0},
    {'col_1': 's3', 'col_2': 3, 'col_3': 3.0},
]

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      )					-> Tuple:
      return DATA_DICT_OF_LISTS

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Optional[Any]							)					-> Union[str, Any]:
      SCREAMING_SNAKE_CASE_							=			datasets.Dataset.from_dict(__UpperCAmelCase							)
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset.arrow'							)
      dataset.map(cache_file_name=__UpperCAmelCase							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	List[str]							)					-> List[str]:
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset.sqlite'							)
      with contextlib.closing(sqlitea.connect(__UpperCAmelCase							)							) as con:
            SCREAMING_SNAKE_CASE_							=			con.cursor()
            cur.execute('CREATE TABLE dataset(col_1 text, col_2 int, col_3 real)'							)
            for item in DATA:
                  cur.execute('INSERT INTO dataset(col_1, col_2, col_3) VALUES (?, ?, ?)'			,			tuple(item.values()							)							)
            con.commit()
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Optional[int]							)					-> str:
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset.csv'							)
      with open(__UpperCAmelCase			,			'w'			,			newline=''							) as f:
            SCREAMING_SNAKE_CASE_							=			csv.DictWriter(__UpperCAmelCase			,			fieldnames=['col_1', 'col_2', 'col_3']							)
            writer.writeheader()
            for item in DATA:
                  writer.writerow(__UpperCAmelCase							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Tuple							)					-> Optional[Any]:
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset2.csv'							)
      with open(__UpperCAmelCase			,			'w'			,			newline=''							) as f:
            SCREAMING_SNAKE_CASE_							=			csv.DictWriter(__UpperCAmelCase			,			fieldnames=['col_1', 'col_2', 'col_3']							)
            writer.writeheader()
            for item in DATA:
                  writer.writerow(__UpperCAmelCase							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	str			,			__UpperCAmelCase						:	Tuple							)					-> str:
      import bza

      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset.csv.bz2'
      with open(__UpperCAmelCase			,			'rb'							) as f:
            SCREAMING_SNAKE_CASE_							=			f.read()
      # data = bytes(FILE_CONTENT, "utf-8")
      with bza.open(__UpperCAmelCase			,			'wb'							) as f:
            f.write(__UpperCAmelCase							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Dict			,			__UpperCAmelCase						:	List[str]			,			__UpperCAmelCase						:	str							)					-> Optional[int]:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset.csv.zip'
      with zipfile.ZipFile(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							)							)
            f.write(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	List[Any]			,			__UpperCAmelCase						:	int			,			__UpperCAmelCase						:	str							)					-> Any:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset.csv.zip'
      with zipfile.ZipFile(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase			,			arcname=os.path.basename(csv_path.replace('.csv'			,			'.CSV'							)							)							)
            f.write(__UpperCAmelCase			,			arcname=os.path.basename(csva_path.replace('.csv'			,			'.CSV'							)							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	int			,			__UpperCAmelCase						:	Tuple			,			__UpperCAmelCase						:	List[Any]							)					-> Union[str, Any]:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset_with_dir.csv.zip'
      with zipfile.ZipFile(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase			,			arcname=os.path.join('main_dir'			,			os.path.basename(__UpperCAmelCase							)							)							)
            f.write(__UpperCAmelCase			,			arcname=os.path.join('main_dir'			,			os.path.basename(__UpperCAmelCase							)							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	List[str]							)					-> Optional[Any]:
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset.parquet'							)
      SCREAMING_SNAKE_CASE_							=			pa.schema(
          {
              'col_1': pa.string(),
              'col_2': pa.intaa(),
              'col_3': pa.floataa(),
          }							)
      with open(__UpperCAmelCase			,			'wb'							) as f:
            SCREAMING_SNAKE_CASE_							=			pq.ParquetWriter(__UpperCAmelCase			,			schema=__UpperCAmelCase							)
            SCREAMING_SNAKE_CASE_							=			pa.Table.from_pydict({k: [DATA[i][k] for i in range(len(__UpperCAmelCase							)							)] for k in DATA[0]}			,			schema=__UpperCAmelCase							)
            writer.write_table(__UpperCAmelCase							)
            writer.close()
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Tuple							)					-> Any:
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset.json'							)
      SCREAMING_SNAKE_CASE_							=			{'data': DATA}
      with open(__UpperCAmelCase			,			'w'							) as f:
            json.dump(__UpperCAmelCase			,			__UpperCAmelCase							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Union[str, Any]							)					-> Optional[Any]:
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset.json'							)
      SCREAMING_SNAKE_CASE_							=			{'data': DATA_DICT_OF_LISTS}
      with open(__UpperCAmelCase			,			'w'							) as f:
            json.dump(__UpperCAmelCase			,			__UpperCAmelCase							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Dict							)					-> List[str]:
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset.jsonl'							)
      with open(__UpperCAmelCase			,			'w'							) as f:
            for item in DATA:
                  f.write(json.dumps(__UpperCAmelCase							) + '\n'							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Optional[Any]							)					-> Optional[Any]:
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset2.jsonl'							)
      with open(__UpperCAmelCase			,			'w'							) as f:
            for item in DATA:
                  f.write(json.dumps(__UpperCAmelCase							) + '\n'							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	List[Any]							)					-> List[Any]:
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset_312.jsonl'							)
      with open(__UpperCAmelCase			,			'w'							) as f:
            for item in DATA_312:
                  f.write(json.dumps(__UpperCAmelCase							) + '\n'							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Optional[Any]							)					-> List[Any]:
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset-str.jsonl'							)
      with open(__UpperCAmelCase			,			'w'							) as f:
            for item in DATA_STR:
                  f.write(json.dumps(__UpperCAmelCase							) + '\n'							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Union[str, Any]			,			__UpperCAmelCase						:	List[str]							)					-> Union[str, Any]:
      import gzip

      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset.txt.gz'							)
      with open(__UpperCAmelCase			,			'rb'							) as orig_file:
            with gzip.open(__UpperCAmelCase			,			'wb'							) as zipped_file:
                  zipped_file.writelines(__UpperCAmelCase							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	str			,			__UpperCAmelCase						:	Optional[Any]							)					-> List[str]:
      import gzip

      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset.jsonl.gz'							)
      with open(__UpperCAmelCase			,			'rb'							) as orig_file:
            with gzip.open(__UpperCAmelCase			,			'wb'							) as zipped_file:
                  zipped_file.writelines(__UpperCAmelCase							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Union[str, Any]			,			__UpperCAmelCase						:	Optional[Any]			,			__UpperCAmelCase						:	Dict							)					-> Optional[int]:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset.jsonl.zip'
      with zipfile.ZipFile(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							)							)
            f.write(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Optional[Any]			,			__UpperCAmelCase						:	Any			,			__UpperCAmelCase						:	List[str]			,			__UpperCAmelCase						:	List[str]							)					-> Optional[int]:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset_nested.jsonl.zip'
      with zipfile.ZipFile(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase			,			arcname=os.path.join('nested'			,			os.path.basename(__UpperCAmelCase							)							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	List[str]			,			__UpperCAmelCase						:	Optional[Any]			,			__UpperCAmelCase						:	str							)					-> Any:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset_with_dir.jsonl.zip'
      with zipfile.ZipFile(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase			,			arcname=os.path.join('main_dir'			,			os.path.basename(__UpperCAmelCase							)							)							)
            f.write(__UpperCAmelCase			,			arcname=os.path.join('main_dir'			,			os.path.basename(__UpperCAmelCase							)							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	List[Any]			,			__UpperCAmelCase						:	List[Any]			,			__UpperCAmelCase						:	Tuple							)					-> Dict:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset.jsonl.tar'
      with tarfile.TarFile(__UpperCAmelCase			,			'w'							) as f:
            f.add(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							)							)
            f.add(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Optional[int]			,			__UpperCAmelCase						:	Optional[int]			,			__UpperCAmelCase						:	Optional[Any]			,			__UpperCAmelCase						:	List[Any]							)					-> List[str]:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset_nested.jsonl.tar'
      with tarfile.TarFile(__UpperCAmelCase			,			'w'							) as f:
            f.add(__UpperCAmelCase			,			arcname=os.path.join('nested'			,			os.path.basename(__UpperCAmelCase							)							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Optional[Any]							)					-> Optional[Any]:
      SCREAMING_SNAKE_CASE_							=			['0', '1', '2', '3']
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset.txt'							)
      with open(__UpperCAmelCase			,			'w'							) as f:
            for item in data:
                  f.write(item + '\n'							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Dict							)					-> Any:
      SCREAMING_SNAKE_CASE_							=			['0', '1', '2', '3']
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset2.txt'							)
      with open(__UpperCAmelCase			,			'w'							) as f:
            for item in data:
                  f.write(item + '\n'							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	List[Any]							)					-> int:
      SCREAMING_SNAKE_CASE_							=			['0', '1', '2', '3']
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset.abc'
      with open(__UpperCAmelCase			,			'w'							) as f:
            for item in data:
                  f.write(item + '\n'							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Any			,			__UpperCAmelCase						:	Dict			,			__UpperCAmelCase						:	Dict							)					-> Union[str, Any]:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset.text.zip'
      with zipfile.ZipFile(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							)							)
            f.write(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Tuple			,			__UpperCAmelCase						:	int			,			__UpperCAmelCase						:	Optional[int]							)					-> Any:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset_with_dir.text.zip'
      with zipfile.ZipFile(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase			,			arcname=os.path.join('main_dir'			,			os.path.basename(__UpperCAmelCase							)							)							)
            f.write(__UpperCAmelCase			,			arcname=os.path.join('main_dir'			,			os.path.basename(__UpperCAmelCase							)							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Union[str, Any]			,			__UpperCAmelCase						:	Any			,			__UpperCAmelCase						:	Union[str, Any]							)					-> Dict:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset.ext.zip'
      with zipfile.ZipFile(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase			,			arcname=os.path.basename('unsupported.ext'							)							)
            f.write(__UpperCAmelCase			,			arcname=os.path.basename('unsupported_2.ext'							)							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Union[str, Any]							)					-> Dict:
      SCREAMING_SNAKE_CASE_							=			'\n'.join(['First', 'Second\u2029with Unicode new line', 'Third']							)
      SCREAMING_SNAKE_CASE_							=			str(tmp_path_factory.mktemp('data'							) / 'dataset_with_unicode_new_lines.txt'							)
      with open(__UpperCAmelCase			,			'w'			,			encoding='utf-8'							) as f:
            f.write(__UpperCAmelCase							)
      return path

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      )					-> List[Any]:
      return os.path.join('tests'			,			'features'			,			'data'			,			'test_image_rgb.jpg'							)

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      )					-> Tuple:
      return os.path.join('tests'			,			'features'			,			'data'			,			'test_audio_44100.wav'							)

@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	Dict			,			__UpperCAmelCase						:	Dict							)					-> int:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data'							) / 'dataset.img.zip'
      with zipfile.ZipFile(__UpperCAmelCase			,			'w'							) as f:
            f.write(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							)							)
            f.write(__UpperCAmelCase			,			arcname=os.path.basename(__UpperCAmelCase							).replace('.jpg'			,			'2.jpg'							)							)
      return path





@pytest.fixture(scope='session'							)
def 					UpperCAmelCase_							(      __UpperCAmelCase						:	str							)					-> Dict:
      SCREAMING_SNAKE_CASE_							=			tmp_path_factory.mktemp('data_dir'							)

      (data_dir / "subdir").mkdir()
      with open(data_dir / 'subdir' / 'train.txt'			,			'w'							) as f:
            f.write('foo\n' * 10							)
      with open(data_dir / 'subdir' / 'test.txt'			,			'w'							) as f:
            f.write('bar\n' * 10							)
      # hidden file
      with open(data_dir / 'subdir' / '.test.txt'			,			'w'							) as f:
            f.write('bar\n' * 10							)

      # hidden directory
      (data_dir / ".subdir").mkdir()
      with open(data_dir / '.subdir' / 'train.txt'			,			'w'							) as f:
            f.write('foo\n' * 10							)
      with open(data_dir / '.subdir' / 'test.txt'			,			'w'							) as f:
            f.write('bar\n' * 10							)

      return data_dir