






'''simple docstring'''



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 UpperCAmelCase_					(    __lowerCAmelCase				):




						"""simple docstring"""




						def __init__( self			:		Tuple     ,      UpperCAmelCase			:		Tuple     ,      UpperCAmelCase			:		str = None     ,      UpperCAmelCase			:		List[str] = None     ,      UpperCAmelCase			:		int = True     ,      UpperCAmelCase			:		Union[str, Any] = None     ,      UpperCAmelCase			:		Optional[int] = False     ,      UpperCAmelCase			:		Optional[int] = None     ,      UpperCAmelCase			:		Any = True     ,      UpperCAmelCase			:		Tuple = "arrow"     ,      **UpperCAmelCase			:		Tuple     ,      )  ->  Dict:


							'''simple docstring'''

							super().__init__(
							    split=lowerCAmelCase_     ,      features=lowerCAmelCase_     ,      cache_dir=lowerCAmelCase_     ,      keep_in_memory=lowerCAmelCase_     ,      streaming=lowerCAmelCase_     ,      **lowerCAmelCase_     ,      )
							lowercase					:   int				  =load_from_cache_file
							lowercase					:   str				  =file_format
							lowercase					:   Tuple				  =Spark(
							    df=lowerCAmelCase_     ,      features=lowerCAmelCase_     ,      cache_dir=lowerCAmelCase_     ,      working_dir=lowerCAmelCase_     ,      **lowerCAmelCase_     ,      )






						def 				A__      ( self			:		Union[str, Any]		)  ->  str:


							'''simple docstring'''

							if self.streaming:
								return self.builder.as_streaming_dataset(split=self.split		)
							lowercase					:   Tuple				  =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		)











'''simple docstring'''



def 							lowercase_				(    __A :       float					,      __A :       int			)       ->      float:



 """simple docstring"""




 if digit_amount > 0:
  return round(number - int(__A			)					,      __A			)
 return number - int(__A			)


if __name__ == "__main__":
      print(decimal_isolate(1.53, 0))
      print(decimal_isolate(35.345, 1))
      print(decimal_isolate(35.345, 2))
      print(decimal_isolate(35.345, 3))
      print(decimal_isolate(-14.789, 3))
      print(decimal_isolate(0, 2))
      print(decimal_isolate(-14.123, 1))
      print(decimal_isolate(-14.123, 2))
      print(decimal_isolate(-14.123, 3))



