

_a:      List[Any]								=     {
    """kilogram""": 1,
    """gram""": pow(10, 3),
    """milligram""": pow(10, 6),
    """metric-ton""": pow(10, -3),
    """long-ton""": 0.0009842073,
    """short-ton""": 0.0011023122,
    """pound""": 2.2046244202,
    """stone""": 0.1574731728,
    """ounce""": 35.2_7399_0723,
    """carrat""": 5000,
    """atomic-mass-unit""": 6.022_136_652e26,
}

_a:      Dict								=     {
    """kilogram""": 1,
    """gram""": pow(10, -3),
    """milligram""": pow(10, -6),
    """metric-ton""": pow(10, 3),
    """long-ton""": 1016.0_4608,
    """short-ton""": 907.184,
    """pound""": 0.453592,
    """stone""": 6.35029,
    """ounce""": 0.0283495,
    """carrat""": 0.0002,
    """atomic-mass-unit""": 1.660_540_199e-27,
}



def  __lowerCAmelCase (  A    ,       A    ,       A      ):

	if to_type not in KILOGRAM_CHART or from_type not in WEIGHT_TYPE_CHART:
		UpperCAmelCase_    			=     (
		    F"Invalid 'from_type' or 'to_type' value: {from_type!r}, {to_type!r}\n"
		    F"Supported values are: {', '.join(SCREAMING_SNAKE_CASE_      )}"
		)
		raise ValueError(SCREAMING_SNAKE_CASE_      )
	return value * KILOGRAM_CHART[to_type] * WEIGHT_TYPE_CHART[from_type]


if __name__ == "__main__":
				import doctest

				doctest.testmod()


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_a:      Dict								=     {
    """configuration_nystromformer""": ["""NYSTROMFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""", """NystromformerConfig"""],
}

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_a:      Any								=     [
				    """NYSTROMFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
				    """NystromformerForMaskedLM""",
				    """NystromformerForMultipleChoice""",
				    """NystromformerForQuestionAnswering""",
				    """NystromformerForSequenceClassification""",
				    """NystromformerForTokenClassification""",
				    """NystromformerLayer""",
				    """NystromformerModel""",
				    """NystromformerPreTrainedModel""",
				]


if TYPE_CHECKING:
				from .configuration_nystromformer import NYSTROMFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, NystromformerConfig

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_nystromformer import (
								    NYSTROMFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
								    NystromformerForMaskedLM,
								    NystromformerForMultipleChoice,
								    NystromformerForQuestionAnswering,
								    NystromformerForSequenceClassification,
								    NystromformerForTokenClassification,
								    NystromformerLayer,
								    NystromformerModel,
								    NystromformerPreTrainedModel,
								)


else:
				import sys

				_a:      Optional[Any]								=     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)