





from typing import Optional

import pyspark

from .. import Features, NamedSplit
from ..download import DownloadMode
from ..packaged_modules.spark.spark import Spark
from .abc import AbstractDatasetReader

class 	__SCREAMING_SNAKE_CASE				(   lowerCAmelCase_     ):



     '''simple docstring'''

     def __init__(							self		:					Union[str, Any]		,lowerCamelCase__		:					pyspark.sql.DataFrame		,lowerCamelCase__		:					Optional[NamedSplit] = None		,lowerCamelCase__		:					Optional[Features] = None		,lowerCamelCase__		:					bool = True		,lowerCamelCase__		:					str = None		,lowerCamelCase__		:					bool = False		,lowerCamelCase__		:					str = None		,lowerCamelCase__		:					bool = True		,lowerCamelCase__		:					str = "arrow"		,**lowerCamelCase__		:					List[Any]		,)  ->	List[str]:




           '''simple docstring'''


           super().__init__(
               split=lowerCamelCase__		,features=lowerCamelCase__		,cache_dir=lowerCamelCase__		,keep_in_memory=lowerCamelCase__		,streaming=lowerCamelCase__		,**lowerCamelCase__		,)
           SCREAMING_SNAKE_CASE	=		load_from_cache_file
           SCREAMING_SNAKE_CASE	=		file_format
           SCREAMING_SNAKE_CASE	=		Spark(
               df=lowerCamelCase__		,features=lowerCamelCase__		,cache_dir=lowerCamelCase__		,working_dir=lowerCamelCase__		,**lowerCamelCase__		,)






     def        SCREAMING_SNAKE_CASE__						(							self		:					int )  ->	Optional[int]:




           '''simple docstring'''


           if self.streaming:
                 return self.builder.as_streaming_dataset(split=self.split )
           SCREAMING_SNAKE_CASE	=		None if self._load_from_cache_file else DownloadMode.FORCE_REDOWNLOAD
           self.builder.download_and_prepare(
               download_mode=lowerCamelCase__		,file_format=self._file_format		,)
           return self.builder.as_dataset(split=self.split )









def      __lowercase     (   _SCREAMING_SNAKE_CASE				,		_SCREAMING_SNAKE_CASE			)				->     float:


      '''simple docstring'''


      return price * (1 + tax_rate)


if __name__ == "__main__":
      print(F'''{price_plus_tax(1_0_0, 0.25) = }''')
      print(F'''{price_plus_tax(125.50, 0.05) = }''')


