


from collections import namedtuple

snake_case							: Optional[Any]      =   namedtuple('''from_to''', '''from_ to''')

snake_case							: Optional[Any]      =   {
    '''cubicmeter''': from_to(1, 1),
    '''litre''': from_to(0.001, 10_00),
    '''kilolitre''': from_to(1, 1),
    '''gallon''': from_to(0.00454, 264.172),
    '''cubicyard''': from_to(0.76455, 1.30795),
    '''cubicfoot''': from_to(0.028, 35.3147),
    '''cup''': from_to(0.000236588, 4226.75),
}






def 							__lowercase     (				__lowerCAmelCase							:       float      ,					__lowerCAmelCase							:       str      ,					__lowerCAmelCase							:       str     ):
							if from_type not in METRIC_CONVERSION:
														raise ValueError(
														    F'Invalid \'from_type\' value: {from_type!r}  Supported values are:\n'
														    + ', '.join(__lowerCAmelCase     )     )
							if to_type not in METRIC_CONVERSION:
														raise ValueError(
														    F'Invalid \'to_type\' value: {to_type!r}.  Supported values are:\n'
														    + ', '.join(__lowerCAmelCase     )     )
							return value * METRIC_CONVERSION[from_type].from_ * METRIC_CONVERSION[to_type].to


if __name__ == "__main__":
						import doctest

						doctest.testmod()








from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


snake_case							: Optional[Any]      =   {'''configuration_focalnet''': ['''FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''FocalNetConfig''']}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						snake_case							: Optional[int]      =   [
						    '''FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST''',
						    '''FocalNetForImageClassification''',
						    '''FocalNetForMaskedImageModeling''',
						    '''FocalNetBackbone''',
						    '''FocalNetModel''',
						    '''FocalNetPreTrainedModel''',
						]

if TYPE_CHECKING:
						from .configuration_focalnet import FOCALNET_PRETRAINED_CONFIG_ARCHIVE_MAP, FocalNetConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_focalnet import (
												    FOCALNET_PRETRAINED_MODEL_ARCHIVE_LIST,
												    FocalNetBackbone,
												    FocalNetForImageClassification,
												    FocalNetForMaskedImageModeling,
												    FocalNetModel,
												    FocalNetPreTrainedModel,
												)

else:
						import sys

						snake_case							: Union[str, Any]      =   _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




