



"""simple docstring"""
__a     =    {
    "kilogram": 1,
    "gram": pow(10, 3),
    "milligram": pow(10, 6),
    "metric-ton": pow(10, -3),
    "long-ton": 0.00_09_84_20_73,
    "short-ton": 0.00_11_02_31_22,
    "pound": 2.20_46_24_42_02,
    "stone": 0.15_74_73_17_28,
    "ounce": 35.2_73_99_07_23,
    "carrat": 50_00,
    "atomic-mass-unit": 6.022_136_652e26,
}

__a     =    {
    "kilogram": 1,
    "gram": pow(10, -3),
    "milligram": pow(10, -6),
    "metric-ton": pow(10, 3),
    "long-ton": 10_16.0_46_08,
    "short-ton": 9_07.1_84,
    "pound": 0.45_35_92,
    "stone": 6.3_50_29,
    "ounce": 0.0_28_34_95,
    "carrat": 0.00_02,
    "atomic-mass-unit": 1.660_540_199e-27,
}
def        A_  (      _lowercase, _lowercase, _lowercase     ):







      '''simple docstring'''


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


if __name__ == "__main__":
      import doctest

      doctest.testmod()





"""simple docstring"""
import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import Mock, patch

import diffusers.utils.hub_utils
class     lowerCamelCase  (      unittest.TestCase    ):






					'''simple docstring'''





					@patch("""diffusers.utils.hub_utils.get_full_repo_name"""						)
					def        lowerCAmelCase_    (	self:							int						,					snake_case:							Mock						)       ->     None:
											snake_case_			:str						=      """full_repo_name"""
											with TemporaryDirectory() as tmpdir:
																	# Dummy args values
																	snake_case_			:int						=      Mock()
																	snake_case_			:Any						=      tmpdir
																	snake_case_			:int						=      0
																	snake_case_			:Optional[int]						=      """hub_token"""
																	snake_case_			:str						=      """dataset_name"""
																	snake_case_			:List[str]						=      0.0_1
																	snake_case_			:Dict						=      100_000
																	snake_case_			:Optional[Any]						=      10_000
																	snake_case_			:Optional[Any]						=      0.0_1
																	snake_case_			:Dict						=      0.0_2
																	snake_case_			:Dict						=      0.0_3
																	snake_case_			:Union[str, Any]						=      0.0_0_0_5
																	snake_case_			:Optional[Any]						=      0.0_0_0_0_0_1
																	snake_case_			:List[Any]						=      1
																	snake_case_			:Optional[Any]						=      10
																	snake_case_			:Dict						=      0.0_0_1
																	snake_case_			:Any						=      0.1
																	snake_case_			:List[Any]						=      0.2
																	snake_case_			:Any						=      True

																	# Model card mush be rendered and saved
																	diffusers.utils.hub_utils.create_model_card(snake_case						,					model_name="""model_name"""						)
																	self.assertTrue((Path(snake_case						) / """README.md""").is_file()						)
