



__lowerCamelCase         =			{
    '''meter''': '''m''',
    '''kilometer''': '''km''',
    '''megametre''': '''Mm''',
    '''gigametre''': '''Gm''',
    '''terametre''': '''Tm''',
    '''petametre''': '''Pm''',
    '''exametre''': '''Em''',
    '''zettametre''': '''Zm''',
    '''yottametre''': '''Ym''',
}
# Exponent of the factor(meter)
__lowerCamelCase         =			{
    '''m''': 0,
    '''km''': 3,
    '''Mm''': 6,
    '''Gm''': 9,
    '''Tm''': 12,
    '''Pm''': 15,
    '''Em''': 18,
    '''Zm''': 21,
    '''Ym''': 24,
}







def    _snake_case (       __snake_case					,  __snake_case					,  __snake_case    )     ->     float:






      '''simple docstring'''







      UpperCAmelCase_  :	Dict				      =		from_type.lower().strip("s"    )
      UpperCAmelCase_  :	int				      =		to_type.lower().strip("s"    )

      UpperCAmelCase_  :	List[Any]				      =		UNIT_SYMBOL.get(__snake_case					,  __snake_case    )
      UpperCAmelCase_  :	int				      =		UNIT_SYMBOL.get(__snake_case					,  __snake_case    )

      if from_sanitized not in METRIC_CONVERSION:
            UpperCAmelCase_  :	List[Any]				      =		(
                F"""Invalid 'from_type' value: {from_type!r}.\n"""
                F"""Conversion abbreviations are: {', '.join(__snake_case    )}"""
            )
            raise ValueError(__snake_case    )
      if to_sanitized not in METRIC_CONVERSION:
            UpperCAmelCase_  :	Optional[int]				      =		(
                F"""Invalid 'to_type' value: {to_type!r}.\n"""
                F"""Conversion abbreviations are: {', '.join(__snake_case    )}"""
            )
            raise ValueError(__snake_case    )
      UpperCAmelCase_  :	Tuple				      =		METRIC_CONVERSION[from_sanitized]
      UpperCAmelCase_  :	Optional[int]				      =		METRIC_CONVERSION[to_sanitized]
      UpperCAmelCase_  :	List[str]				      =		1

      if from_exponent > to_exponent:
            UpperCAmelCase_  :	Tuple				      =		from_exponent - to_exponent
      else:
            UpperCAmelCase_  :	Union[str, Any]				      =		-(to_exponent - from_exponent)

      return value * pow(1_0					,  __snake_case    )


if __name__ == "__main__":
   from doctest import testmod

   testmod()





from abc import ABC, abstractmethod
from typing import Optional, Union

from .. import Dataset, DatasetDict, Features, IterableDataset, IterableDatasetDict, NamedSplit
from ..utils.typing import NestedDataStructureLike, PathLike


class   snake_case_ (lowercase__  ):




       """simple docstring"""






       def __init__(     self     ,lowercase = None     ,lowercase = None     ,lowercase = None     ,lowercase = None     ,lowercase = False     ,lowercase = False     ,lowercase = None     ,**lowercase     ,):

             """simple docstring"""





             UpperCAmelCase_  :	Optional[Any]				      =		path_or_paths
             UpperCAmelCase_  :	Optional[int]				      =		split if split or isinstance(lowercase     ,lowercase) else "train"
             UpperCAmelCase_  :	Optional[int]				      =		features
             UpperCAmelCase_  :	Dict				      =		cache_dir
             UpperCAmelCase_  :	int				      =		keep_in_memory
             UpperCAmelCase_  :	Tuple				      =		streaming
             UpperCAmelCase_  :	Union[str, Any]				      =		num_proc
             UpperCAmelCase_  :	Union[str, Any]				      =		kwargs



       @abstractmethod
       def  A_   (     self):

             """simple docstring"""





             pass


class   snake_case_ (lowercase__  ):




       """simple docstring"""






       def __init__(     self     ,lowercase = None     ,lowercase = None     ,lowercase = False     ,lowercase = False     ,lowercase = None     ,**lowercase     ,):

             """simple docstring"""





             UpperCAmelCase_  :	List[Any]				      =		features
             UpperCAmelCase_  :	List[Any]				      =		cache_dir
             UpperCAmelCase_  :	List[str]				      =		keep_in_memory
             UpperCAmelCase_  :	Optional[int]				      =		streaming
             UpperCAmelCase_  :	Dict				      =		num_proc
             UpperCAmelCase_  :	str				      =		kwargs



       @abstractmethod
       def  A_   (     self):

             """simple docstring"""





             pass
