






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






def 				lowerCamelCase__      (    __lowerCamelCase			:     float  ,		__lowerCamelCase			:     str  ,		__lowerCamelCase			:     str		):
  __UpperCAmelCase							:	Tuple           =  from_type.lower().strip("""s"""		)
  __UpperCAmelCase							:	Tuple           =  to_type.lower().strip("""s"""		)

  __UpperCAmelCase							:	str           =  UNIT_SYMBOL.get(__lowerCamelCase  ,		__lowerCamelCase		)
  __UpperCAmelCase							:	List[Any]           =  UNIT_SYMBOL.get(__lowerCamelCase  ,		__lowerCamelCase		)

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

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

  return value * pow(10  ,		__lowerCamelCase		)


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     a    ( lowercase__   ):



      """simple docstring"""


      def __init__(      self					:			Any		,      __lowercase					:			Optional[NestedDataStructureLike[PathLike]] = None		,      __lowercase					:			Optional[NamedSplit] = None		,      __lowercase					:			Optional[Features] = None		,      __lowercase					:			str = None		,      __lowercase					:			bool = False		,      __lowercase					:			bool = False		,      __lowercase					:			Optional[int] = None		,      **__lowercase					:			List[str]		,      )							->      Tuple:
        __UpperCAmelCase							:	Any           =  path_or_paths
        __UpperCAmelCase							:	Dict           =  split if split or isinstance(__lowercase		,      __lowercase					) else """train"""
        __UpperCAmelCase							:	Optional[int]           =  features
        __UpperCAmelCase							:	str           =  cache_dir
        __UpperCAmelCase							:	str           =  keep_in_memory
        __UpperCAmelCase							:	Optional[int]           =  streaming
        __UpperCAmelCase							:	Dict           =  num_proc
        __UpperCAmelCase							:	Tuple           =  kwargs




      @abstractmethod
      def 	UpperCAmelCase      (      self					:			List[Any]					)							->      Union[Dataset, DatasetDict, IterableDataset, IterableDatasetDict]:
        pass


class     a    ( lowercase__   ):



      """simple docstring"""


      def __init__(      self					:			List[str]		,      __lowercase					:			Optional[Features] = None		,      __lowercase					:			str = None		,      __lowercase					:			bool = False		,      __lowercase					:			bool = False		,      __lowercase					:			Optional[int] = None		,      **__lowercase					:			Optional[Any]		,      )							->      Optional[int]:
        __UpperCAmelCase							:	Optional[Any]           =  features
        __UpperCAmelCase							:	str           =  cache_dir
        __UpperCAmelCase							:	Optional[int]           =  keep_in_memory
        __UpperCAmelCase							:	Dict           =  streaming
        __UpperCAmelCase							:	Optional[Any]           =  num_proc
        __UpperCAmelCase							:	Union[str, Any]           =  kwargs




      @abstractmethod
      def 	UpperCAmelCase      (      self					:			List[str]					)							->      Union[Dataset, IterableDataset]:
        pass


