



"""simple docstring"""

from collections import namedtuple

lowercase__					:						Dict												=						namedtuple('''from_to''', '''from_ to''')

lowercase__					:						List[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    (							_a	,    _a	,    _a					):
    if from_type not in METRIC_CONVERSION:
        raise ValueError(
            f"Invalid 'from_type' value: {from_type!r}  Supported values are:\n"
            + ''', '''.join(_a					)					)
    if to_type not in METRIC_CONVERSION:
        raise ValueError(
            f"Invalid 'to_type' value: {to_type!r}.  Supported values are:\n"
            + ''', '''.join(_a					)					)
    return value * METRIC_CONVERSION[from_type].from_ * METRIC_CONVERSION[to_type].to


if __name__ == "__main__":
     import doctest

     doctest.testmod()










"""simple docstring"""

from dataclasses import dataclass
from enum import Enum
from typing import List, Optional, Union

import numpy as np
import PIL
from PIL import Image

from ...utils import BaseOutput, is_torch_available, is_transformers_available




@dataclass
class  _UpperCAmelCase (    lowerCAmelCase__):
 _lowerCAmelCase     :    Union[List[PIL.Image.Image], np.ndarray]
 _lowerCAmelCase     :    Optional[List[bool]]


if is_transformers_available() and is_torch_available():
     from .pipeline_semantic_stable_diffusion import SemanticStableDiffusionPipeline





