

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 				SCREAMING_SNAKE_CASE__ (datasets.BuilderConfig					):
    __lowerCamelCase						:	Dict														=					None



class 				SCREAMING_SNAKE_CASE__ (datasets.ArrowBasedBuilder					):
    __lowerCamelCase						:	Optional[Any]														=					PandasConfig





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





    def 				snake_case_    (				self						,       a):







         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}""")
         lowercase__   :       str				=	dl_manager.download_and_extract(self.config.data_files)
         if isinstance(lowercase_						,       (str, list, tuple)):
              lowercase__   :       str				=	data_files
              if isinstance(lowercase_						,       lowercase_):
                   lowercase__   :       Optional[int]				=	[files]
              # Use `dl_manager.iter_files` to skip hidden files in an extracted archive
              lowercase__   :       Any				=	[dl_manager.iter_files(lowercase_) for file in files]
              return [datasets.SplitGenerator(name=datasets.Split.TRAIN						,       gen_kwargs={'files': files})]
         lowercase__   :       List[str]				=	[]
         for split_name, files in data_files.items():
              if isinstance(lowercase_						,       lowercase_):
                   lowercase__   :       Dict				=	[files]
              # Use `dl_manager.iter_files` to skip hidden files in an extracted archive
              lowercase__   :       Optional[int]				=	[dl_manager.iter_files(lowercase_) for file in files]
              splits.append(datasets.SplitGenerator(name=lowercase_						,       gen_kwargs={'files': files}))
         return splits





    def 				snake_case_    (				self						,       a):







         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
              lowercase__   :       Union[str, Any]				=	table_cast(lowercase_						,       self.config.features.arrow_schema)
         return pa_table





    def 				snake_case_    (				self						,       a):







         for i, file in enumerate(itertools.chain.from_iterable(lowercase_)):
              with open(lowercase_						,       'rb') as f:
                   lowercase__   :       Optional[Any]				=	pa.Table.from_pandas(pd.read_pickle(lowercase_))
                   yield i, self._cast_table(lowercase_)




def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   float      ):



     '''simple docstring'''





     if edge <= 0 or not isinstance(SCREAMING_SNAKE_CASE_     ,					SCREAMING_SNAKE_CASE_      ):
          raise ValueError('Length must be a positive.'      )
     return 3 * ((25 + 10 * (5 ** (1 / 2))) ** (1 / 2)) * (edge**2)

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   float      ):



     '''simple docstring'''





     if edge <= 0 or not isinstance(SCREAMING_SNAKE_CASE_     ,					SCREAMING_SNAKE_CASE_      ):
          raise ValueError('Length must be a positive.'      )
     return ((15 + (7 * (5 ** (1 / 2)))) / 4) * (edge**3)


if __name__ == "__main__":
       import doctest

       doctest.testmod()

