'''simple docstring'''





import json
import os
import pickle
import subprocess
from hashlib import mda
from pathlib import Path
from tempfile import gettempdir
from textwrap import dedent
from types import CodeType, FunctionType
from unittest import TestCase
from unittest.mock import patch

import pytest
from multiprocess import Pool
from packaging import version

import datasets
from datasets.fingerprint import Hasher, fingerprint_transform
from datasets.table import InMemoryTable

from .utils import (
    require_regex,
    require_spacy,
    require_spacy_model,
    require_tiktoken,
    require_torch,
    require_transformers,
)



class    UpperCamelCase :







    """simple docstring"""





    def __init__( self			:		Optional[Any]				,				UpperCAmelCase_			:		Union[str, Any]):


         """simple docstring"""







         a :				Union[str, Any]				=      foo







    def __call__( self			:		Tuple):


         """simple docstring"""







         return self.foo






class    UpperCamelCase (    datasets.Dataset    ):







    """simple docstring"""





    @fingerprint_transform(inplace=__lowercase)
    def 					SCREAMING_SNAKE_CASE_			( self			:		List[Any]				,				UpperCAmelCase_			:		Tuple				,				*UpperCAmelCase_			:		Tuple				,				**UpperCAmelCase_			:		Tuple):


         """simple docstring"""







         return DatasetChild(self.data				,				fingerprint=__lowercase)







    @fingerprint_transform(inplace=__lowercase)
    def 					SCREAMING_SNAKE_CASE_			( self			:		Dict				,				UpperCAmelCase_			:		Optional[int]				,				*UpperCAmelCase_			:		str				,				**UpperCAmelCase_			:		List[Any]):


         """simple docstring"""







         return DatasetChild(self.data				,				fingerprint=__lowercase)






class    UpperCamelCase :







    """simple docstring"""





    def __init__( self			:		List[Any]				,				UpperCAmelCase_			:		Dict):


         """simple docstring"""







         a :				List[str]				=      callable





    def __call__( self			:		int				,				*UpperCAmelCase_			:		str				,				**UpperCAmelCase_			:		List[str]):


         """simple docstring"""







         if self.callable is not None:
              return self.callable(*__lowercase				,				**__lowercase)







    def __getstate__( self			:		Tuple):


         """simple docstring"""







         raise pickle.PicklingError()






class    UpperCamelCase (    a_    ):







    """simple docstring"""





    @require_transformers
    @pytest.mark.integration
    def 					SCREAMING_SNAKE_CASE_			( self			:		Tuple):


         """simple docstring"""







         from transformers import AutoTokenizer

         def encode(UpperCAmelCase_			:		Optional[Any]):
              return tokenizer(__lowercase)

         # TODO: add hash consistency tests across sessions
         a :				Tuple				=      AutoTokenizer.from_pretrained('bert-base-uncased')
         a :				List[str]				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				Any				=      mda(datasets.utils.py_utils.dumps(lambda UpperCAmelCase_: tokenizer(__lowercase))).hexdigest()
         a :				List[Any]				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				Tuple				=      AutoTokenizer.from_pretrained('bert-base-cased')
         a :				Tuple				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				List[str]				=      mda(datasets.utils.py_utils.dumps(lambda UpperCAmelCase_: tokenizer(__lowercase))).hexdigest()
         a :				Dict				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				str				=      AutoTokenizer.from_pretrained('bert-base-uncased')
         a :				int				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				Optional[Any]				=      mda(datasets.utils.py_utils.dumps(lambda UpperCAmelCase_: tokenizer(__lowercase))).hexdigest()
         a :				Tuple				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)





    @require_transformers
    @pytest.mark.integration
    def 					SCREAMING_SNAKE_CASE_			( self			:		Optional[Any]):


         """simple docstring"""







         from transformers import AutoTokenizer

         a :				Union[str, Any]				=      AutoTokenizer.from_pretrained('gpt2')
         a :				List[str]				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         tokenizer('Hello world !')  # call once to change the tokenizer's cache
         a :				Any				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)







    @require_regex
    def 					SCREAMING_SNAKE_CASE_			( self			:		Dict):


         """simple docstring"""







         import regex

         a :				List[Any]				=      regex.Regex('foo')
         a :				Tuple				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				List[str]				=      regex.Regex('bar')
         a :				Tuple				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				int				=      regex.Regex('foo')
         a :				int				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)






class    UpperCamelCase (    a_    ):







    """simple docstring"""





    def 					SCREAMING_SNAKE_CASE_			( self			:		str):


         """simple docstring"""







         def func():
              return foo

         a :				Dict				=      [0]
         a :				Optional[int]				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				Tuple				=      [1]
         a :				List[Any]				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				Optional[int]				=      [0]
         a :				int				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)





    def 					SCREAMING_SNAKE_CASE_			( self			:		Tuple):


         """simple docstring"""







         def func():
              pass

         a :				str				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()

         def func():
              pass

         a :				Dict				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)





    def 					SCREAMING_SNAKE_CASE_			( self			:		List[Any]):


         """simple docstring"""







         a :				Tuple				=      mda(datasets.utils.py_utils.dumps(Foo([0]))).hexdigest()
         a :				List[Any]				=      mda(datasets.utils.py_utils.dumps(Foo([1]))).hexdigest()
         a :				List[Any]				=      mda(datasets.utils.py_utils.dumps(Foo([0]))).hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)





    def 					SCREAMING_SNAKE_CASE_			( self			:		int):


         """simple docstring"""







         a :				List[str]				=      mda(datasets.utils.py_utils.dumps(Foo([0]).__call__)).hexdigest()
         a :				int				=      mda(datasets.utils.py_utils.dumps(Foo([1]).__call__)).hexdigest()
         a :				Union[str, Any]				=      mda(datasets.utils.py_utils.dumps(Foo([0]).__call__)).hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)





    def 					SCREAMING_SNAKE_CASE_			( self			:		Tuple):


         """simple docstring"""







         a :				Dict				=      (
             'co_argcount',
             'co_kwonlyargcount',
             'co_nlocals',
             'co_stacksize',
             'co_flags',
             'co_code',
             'co_consts',
             'co_names',
             'co_varnames',
             'co_filename',
             'co_name',
             'co_firstlineno',
             'co_lnotab',
             'co_freevars',
             'co_cellvars',
         )

         def _create_code_pyaa(*UpperCAmelCase_			:		int):
              if hasattr(args[-3]				,				'encode'):
                   a :				int				=      list(__lowercase)
                   a :				Any				=      args[-3].encode()  # co_lnotab
                   a :				Optional[int]				=      args[-1_0].encode()  # co_code
              if hasattr(__lowercase				,				'co_posonlyargcount'):
                   if len(__lowercase) == 1_6:
                        return CodeType(*__lowercase)
                   elif len(__lowercase) == 1_5:
                        return CodeType(args[0]				,				0				,				*args[1:])
                   return CodeType(args[0]				,				0				,				0				,				*args[1:])
              elif hasattr(__lowercase				,				'co_kwonlyargcount'):
                   if len(__lowercase) == 1_6:
                        return CodeType(args[0]				,				*args[2:])
                   elif len(__lowercase) == 1_5:
                        return CodeType(*__lowercase)
                   return CodeType(args[0]				,				0				,				*args[1:])
              if len(__lowercase) == 1_6:
                   return CodeType(args[0]				,				*args[3:])
              elif len(__lowercase) == 1_5:
                   return CodeType(args[0]				,				*args[2:])
              return CodeType(*__lowercase)

         def create_ipython_func(UpperCAmelCase_			:		int				,				UpperCAmelCase_			:		str):
              def func():
                   return returned_obj

              a :				Dict				=      func.__code__
              # Use _create_code from dill in order to make it work for different python versions
              if datasets.config.PY_VERSION < version.parse('3.8'):
                   a :				Optional[int]				=      _create_code_pyaa(
                       *[getattr(__lowercase				,				__lowercase) if k != 'co_filename' else co_filename for k in code_args_pyaa])
              else:
                   a :				Optional[int]				=      code.replace(co_filename=__lowercase)
              return FunctionType(__lowercase				,				func.__globals__				,				func.__name__				,				func.__defaults__				,				func.__closure__)

         a :				List[str]				=      '<ipython-input-2-e0383a102aae>', [0]
         a :				Optional[Any]				=      mda(datasets.utils.py_utils.dumps(create_ipython_func(__lowercase				,				__lowercase))).hexdigest()
         a :				int				=      '<ipython-input-2-e0383a102aae>', [1]
         a :				int				=      mda(datasets.utils.py_utils.dumps(create_ipython_func(__lowercase				,				__lowercase))).hexdigest()
         a :				Optional[int]				=      '<ipython-input-5-713f6613acf3>', [0]
         a :				List[str]				=      mda(datasets.utils.py_utils.dumps(create_ipython_func(__lowercase				,				__lowercase))).hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)

         a :				List[Any]				=      os.path.join(gettempdir()				,				'ipykernel_12345'				,				'321456789.py'), [0]
         a :				List[str]				=      mda(datasets.utils.py_utils.dumps(create_ipython_func(__lowercase				,				__lowercase))).hexdigest()
         a :				List[str]				=      os.path.join(gettempdir()				,				'ipykernel_12345'				,				'321456789.py'), [1]
         a :				List[Any]				=      mda(datasets.utils.py_utils.dumps(create_ipython_func(__lowercase				,				__lowercase))).hexdigest()
         a :				Optional[int]				=      os.path.join(gettempdir()				,				'ipykernel_12345'				,				'654123987.py'), [0]
         a :				Optional[Any]				=      mda(datasets.utils.py_utils.dumps(create_ipython_func(__lowercase				,				__lowercase))).hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)







    def 					SCREAMING_SNAKE_CASE_			( self			:		Dict):


         """simple docstring"""







         a :				Union[str, Any]				=      [0], [1]

         def func():
              return foo, bar

         a :				Any				=      '__main__'

         def globalvars_mocka_side_effect(UpperCAmelCase_			:		str				,				*UpperCAmelCase_			:		Dict				,				**UpperCAmelCase_			:		Dict):
              return {"foo": foo, "bar": bar}

         def globalvars_mocka_side_effect(UpperCAmelCase_			:		Union[str, Any]				,				*UpperCAmelCase_			:		Optional[int]				,				**UpperCAmelCase_			:		int):
              return {"bar": bar, "foo": foo}

         with patch('dill.detect.globalvars'				,				side_effect=__lowercase) as globalvars_mocka:
              a :				List[str]				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
              self.assertGreater(globalvars_mocka.call_count				,				0)
         with patch('dill.detect.globalvars'				,				side_effect=__lowercase) as globalvars_mocka:
              a :				Dict				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
              self.assertGreater(globalvars_mocka.call_count				,				0)
         self.assertEqual(__lowercase				,				__lowercase)






class    UpperCamelCase (    a_    ):







    """simple docstring"""





    def 					SCREAMING_SNAKE_CASE_			( self			:		List[Any]):


         """simple docstring"""







         a :				Union[str, Any]				=      Hasher.hash('hello')
         a :				Dict				=      Hasher.hash('hello')
         a :				List[Any]				=      Hasher.hash('there')
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)





    def 					SCREAMING_SNAKE_CASE_			( self			:		Dict):


         """simple docstring"""







         a :				Any				=      Hasher.hash(Foo('hello'))
         a :				Optional[int]				=      Hasher.hash(Foo('hello'))
         a :				List[str]				=      Hasher.hash(Foo('there'))
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)





    def 					SCREAMING_SNAKE_CASE_			( self			:		Dict):


         """simple docstring"""







         a :				List[str]				=      Hasher()
         for x in ["hello", Foo('hello')]:
              hasher.update(__lowercase)
         a :				int				=      hasher.hexdigest()
         a :				Optional[Any]				=      Hasher()
         for x in ["hello", Foo('hello')]:
              hasher.update(__lowercase)
         a :				List[str]				=      hasher.hexdigest()
         a :				List[Any]				=      Hasher()
         for x in ["there", Foo('there')]:
              hasher.update(__lowercase)
         a :				Union[str, Any]				=      hasher.hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)





    def 					SCREAMING_SNAKE_CASE_			( self			:		List[str]):


         """simple docstring"""







         with self.assertRaises(pickle.PicklingError):
              Hasher.hash(UnpicklableCallable(Foo('hello')))





    def 					SCREAMING_SNAKE_CASE_			( self			:		List[Any]):


         """simple docstring"""







         a :				Tuple				=      'abc'
         a :				Tuple				=      [string, string]  # two strings have the same ids
         a :				List[Any]				=      [string, string]
         a :				List[Any]				=      json.loads(f"""[\"{string}\", \"{string}\"]""")  # two strings have different ids
         self.assertIs(obja[0]				,				__lowercase)
         self.assertIs(obja[0]				,				obja[1])
         self.assertIs(obja[0]				,				__lowercase)
         self.assertIs(obja[0]				,				obja[1])
         self.assertIsNot(obja[0]				,				__lowercase)
         self.assertIsNot(obja[0]				,				obja[1])
         a :				Union[str, Any]				=      Hasher.hash(__lowercase)
         a :				str				=      Hasher.hash(__lowercase)
         a :				List[str]				=      Hasher.hash(__lowercase)
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertEqual(__lowercase				,				__lowercase)





    @require_tiktoken
    def 					SCREAMING_SNAKE_CASE_			( self			:		str):


         """simple docstring"""







         import tiktoken

         a :				Dict				=      tiktoken.get_encoding('gpt2')
         a :				Dict				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				Union[str, Any]				=      tiktoken.get_encoding('r50k_base')
         a :				Optional[int]				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				str				=      tiktoken.get_encoding('gpt2')
         a :				List[Any]				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)





    @require_torch
    def 					SCREAMING_SNAKE_CASE_			( self			:		int):


         """simple docstring"""







         import torch

         a :				Optional[int]				=      torch.tensor([1.0])
         a :				str				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				List[str]				=      torch.tensor([2.0])
         a :				Union[str, Any]				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				Optional[Any]				=      torch.tensor([1.0])
         a :				Tuple				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)







    @require_spacy
    @require_spacy_model('en_core_web_sm')
    @require_spacy_model('fr_core_news_sm')
    @pytest.mark.integration
    def 					SCREAMING_SNAKE_CASE_			( self			:		Union[str, Any]):


         """simple docstring"""







         import spacy

         a :				Any				=      spacy.load('en_core_web_sm')
         a :				List[str]				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				List[Any]				=      spacy.load('fr_core_news_sm')
         a :				str				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         a :				Dict				=      spacy.load('en_core_web_sm')
         a :				List[str]				=      mda(datasets.utils.py_utils.dumps(__lowercase)).hexdigest()
         self.assertEqual(__lowercase				,				__lowercase)
         self.assertNotEqual(__lowercase				,				__lowercase)






@pytest.mark.integration
def SCREAMING_SNAKE_CASE__   (							snake_case    :							Tuple   )					->							str:







     """simple docstring"""
     a :				Any				=      tmp_path / 'dir1'
     a :				Dict				=      tmp_path / 'dir2'
     dira.mkdir()
     dira.mkdir()
     a :				int				=      'script.py'
     a :				Dict				=      dedent(
         '\n    from datasets.fingerprint import Hasher\n    def foo():\n        pass\n    print(Hasher.hash(foo))\n    '   )
     a :				int				=      dira / script_filename
     a :				List[Any]				=      dira / script_filename
     with script_patha.open('w'   ) as f:
          f.write(snake_case   )
     with script_patha.open('w'   ) as f:
          f.write(snake_case   )
     a :				Optional[int]				=      subprocess.check_output(['python', str(snake_case   )]   )
     a :				List[str]				=      subprocess.check_output(['python', str(snake_case   )]   )
     assert fingerprinta == fingerprinta






def SCREAMING_SNAKE_CASE__   (							)					->							Dict:







     """simple docstring"""
     a :				Dict				=      {'a': [0, 1, 2]}
     a :				Any				=      DatasetChild(InMemoryTable.from_pydict(snake_case   )   )
     a :				Optional[int]				=      dataset.funca()._fingerprint
     assert expected_fingerprint == dataset.funca()._fingerprint
     assert expected_fingerprint != dataset.funca()._fingerprint

     with Pool(2   ) as p:
          assert expected_fingerprint == p.apply_async(dataset.funca   ).get()._fingerprint
          assert expected_fingerprint != p.apply_async(dataset.funca   ).get()._fingerprint






def SCREAMING_SNAKE_CASE__   (							)					->							str:







     """simple docstring"""
     a :				Union[str, Any]				=      {'a': [0, 1, 2]}



     class    UpperCamelCase (    datasets.Dataset    ):







         """simple docstring"""





         @fingerprint_transform(inplace=__lowercase)
         def 					SCREAMING_SNAKE_CASE_			( self			:		int				,				UpperCAmelCase_			:		Union[str, Any]):


              """simple docstring"""







              return DummyDatasetChild(self.data				,				fingerprint=__lowercase)






     a :				str				=      DummyDatasetChild(InMemoryTable.from_pydict(snake_case   )   ).func()



     class    UpperCamelCase (    datasets.Dataset    ):







         """simple docstring"""





         @fingerprint_transform(inplace=__lowercase				,				version='1.0.0')
         def 					SCREAMING_SNAKE_CASE_			( self			:		Tuple				,				UpperCAmelCase_			:		Any):


              """simple docstring"""







              return DummyDatasetChild(self.data				,				fingerprint=__lowercase)






     a :				int				=      DummyDatasetChild(InMemoryTable.from_pydict(snake_case   )   ).func()



     class    UpperCamelCase (    datasets.Dataset    ):







         """simple docstring"""





         @fingerprint_transform(inplace=__lowercase				,				version='2.0.0')
         def 					SCREAMING_SNAKE_CASE_			( self			:		Tuple				,				UpperCAmelCase_			:		Union[str, Any]):


              """simple docstring"""







              return DummyDatasetChild(self.data				,				fingerprint=__lowercase)






     a :				Optional[int]				=      DummyDatasetChild(InMemoryTable.from_pydict(snake_case   )   ).func()

     assert len({fingeprint_no_version, fingeprint_a, fingeprint_a}   ) == 3






def SCREAMING_SNAKE_CASE__   (							)					->							Dict:







     """simple docstring"""
     a :				str				=      Hasher()
     hasher.update(lambda snake_case   : x   )







import json
import os
from dataclasses import dataclass

import numpy as np
import pyarrow as pa

import datasets
from utils import get_duration


UpperCamelCase__              =						1_0_0_0_0_0_0_0_0_0_0_0
UpperCamelCase__              =						1_0_0_0_0

UpperCamelCase__       , UpperCamelCase__              =						os.path.split(__file__)
UpperCamelCase__              =						os.path.join(RESULTS_BASEPATH, 'results', RESULTS_FILENAME.replace('.py', '.json'))






def 					snake_case					(							A						,   A			)							->							datasets.Dataset:




	'''simple docstring'''


	lowerCamelCase_							:		int							   =							pa.Table.from_pydict({'col': [0] * chunk_size}			)
	lowerCamelCase_							:		List[str]							   =							pa.concat_tables([table] * (num_examples // chunk_size)			)
	return datasets.Dataset(A						,   fingerprint='table_100B'			)


@dataclass
class 				__SCREAMING_SNAKE_CASE							:
					_lowerCamelCase		  = 42
					_lowerCamelCase		  = 42
					_lowerCamelCase		  = 42
					_lowerCamelCase		  = 42

					def 	lowercase_							(				self					):







						'''simple docstring'''




						lowerCamelCase_							:		Optional[Any]							   =							np.random.default_rng(self.seed					)
						lowerCamelCase_							:		Any							   =							rng.integers(low=self.low ,       high=self.high ,       size=self.size					).tolist()

					def __iter__(				self					):







						'''simple docstring'''




						return iter(self._sampled_values					)





					def __len__(				self					):







						'''simple docstring'''




						return self.size






@get_duration
def 					snake_case					(							A			)							->							Optional[Any]:




	'''simple docstring'''


	lowerCamelCase_							:		Union[str, Any]							   =							dataset[0]






@get_duration
def 					snake_case					(							A			)							->							Any:




	'''simple docstring'''


	lowerCamelCase_							:		List[Any]							   =							dataset[-1]






@get_duration
def 					snake_case					(							A			)							->							Optional[Any]:




	'''simple docstring'''


	lowerCamelCase_							:		Tuple							   =							dataset[range(len(A			) // 2						,   len(A			) // 2 + 1024			)]






@get_duration
def 					snake_case					(							A			)							->							str:




	'''simple docstring'''


	lowerCamelCase_							:		List[str]							   =							dataset[RandIter(0						,   len(A			)						,   1024						,   seed=42			)]






def 					snake_case					(							)							->							List[Any]:




	'''simple docstring'''


	lowerCamelCase_							:		Tuple							   =							{'num examples': SPEED_TEST_N_EXAMPLES}
	lowerCamelCase_							:		Optional[int]							   =							(get_first_row, get_last_row, get_batch_of_aaaa_rows, get_batch_of_aaaa_random_rows)
	print('generating dataset'			)
	lowerCamelCase_							:		List[Any]							   =							generate_100B_dataset(num_examples=A						,   chunk_size=A			)
	print('Functions'			)
	for func in functions:
		print(func.__name__			)
		lowerCamelCase_							:		str							   =							func(A			)

	with open(A						,   'wb'			) as f:
		f.write(json.dumps(A			).encode('utf-8'			)			)


if __name__ == "__main__":  # useful to run the profiler
							benchmark_table_100B()
