'''simple docstring'''





import itertools
from dataclasses import dataclass
from typing import Optional

import pandas as pd
import pyarrow as pa

import datasets
from datasets.table import table_cast




@dataclass
class        __A      ( datasets.BuilderConfig	):
    a__       :						Optional[datasets.Features]          =  None




class        __A      ( datasets.ArrowBasedBuilder	):
    a__       :						str          =  PandasConfig



    def 					_lowercase						(self    :    Any ):
         return datasets.DatasetInfo(features=self.config.features )



    def 					_lowercase						(self    :    str   ,			__a    :    List[str] ):
         if not self.config.data_files:
              raise ValueError(f"""At least one data file must be specified, but got data_files={self.config.data_files}""" )
         UpperCAmelCase_           =   dl_manager.download_and_extract(self.config.data_files )
         if isinstance(__a   ,			(str, list, tuple) ):
              UpperCAmelCase_           =   data_files
              if isinstance(__a   ,			__a ):
                   UpperCAmelCase_           =   [files]
              # Use `dl_manager.iter_files` to skip hidden files in an extracted archive
              UpperCAmelCase_           =   [dl_manager.iter_files(__a ) for file in files]
              return [datasets.SplitGenerator(name=datasets.Split.TRAIN   ,			gen_kwargs={"files": files} )]
         UpperCAmelCase_           =   []
         for split_name, files in data_files.items():
              if isinstance(__a   ,			__a ):
                   UpperCAmelCase_           =   [files]
              # Use `dl_manager.iter_files` to skip hidden files in an extracted archive
              UpperCAmelCase_           =   [dl_manager.iter_files(__a ) for file in files]
              splits.append(datasets.SplitGenerator(name=__a   ,			gen_kwargs={"files": files} ) )
         return splits



    def 					_lowercase						(self    :    str   ,			__a    :    pa.Table ):
         if self.config.features is not None:
              # more expensive cast to support nested features with keys in a different order
              # allows str <-> int/float or str to Audio for example
              UpperCAmelCase_           =   table_cast(__a   ,			self.config.features.arrow_schema )
         return pa_table






    def 					_lowercase						(self    :    List[str]   ,			__a    :    List[Any] ):
         for i, file in enumerate(itertools.chain.from_iterable(__a ) ):
              with open(__a   ,			"rb" ) as f:
                   UpperCAmelCase_           =   pa.Table.from_pandas(pd.read_pickle(__a ) )
                   yield i, self._cast_table(__a )





'''simple docstring'''





def 	lowerCAmelCase_				(					snake_case_       : int					,    snake_case_       : int			)    ->      int:


     '''simple docstring'''




     return x if y == 0 else greatest_common_divisor(snake_case_					,    x % y			)





def 	lowerCAmelCase_				(					snake_case_       : int					,    snake_case_       : int			)    ->      int:


     '''simple docstring'''




     return (x * y) // greatest_common_divisor(snake_case_					,    snake_case_			)





def 	lowerCAmelCase_				(					snake_case_       : int = 20			)    ->      int:


     '''simple docstring'''




     UpperCAmelCase_           =   1
     for i in range(1					,    n + 1			):
          UpperCAmelCase_           =   lcm(snake_case_					,    snake_case_			)
     return g


if __name__ == "__main__":
    print(f"{solution() = }")




