






import warnings

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding




class       snake_case__ (				lowercase_):

       '''simple docstring'''
       lowerCamelCase				:					Dict								=			["image_processor", "tokenizer"]
       lowerCamelCase				:					Dict								=			"CLIPImageProcessor"
       lowerCamelCase				:					Dict								=			("CLIPTokenizer", "CLIPTokenizerFast")



       def __init__(				self      ,    a__=None      ,    a__=None      ,    **a__     )			->   Tuple:






            '''simple docstring'''





            __snake_case      :Optional[int] 							=    None
            if "feature_extractor" in kwargs:
                 warnings.warn(
                     """The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`"""
                     """ instead."""      ,    a__      ,    )
                 __snake_case      :Dict 							=    kwargs.pop("""feature_extractor"""     )

            __snake_case      :int 							=    image_processor if image_processor is not None else feature_extractor
            if image_processor is None:
                 raise ValueError("""You need to specify an `image_processor`."""     )
            if tokenizer is None:
                 raise ValueError("""You need to specify a `tokenizer`."""     )

            super().__init__(a__      ,    a__     )



       def __call__(				self      ,    a__=None      ,    a__=None      ,    a__=None      ,    **a__     )			->   Optional[int]:






            '''simple docstring'''





            if text is None and images is None:
                 raise ValueError("""You have to specify either text or images. Both cannot be none."""     )

            if text is not None:
                 __snake_case      :Dict 							=    self.tokenizer(a__      ,    return_tensors=a__      ,    **a__     )

            if images is not None:
                 __snake_case      :str 							=    self.image_processor(a__      ,    return_tensors=a__      ,    **a__     )

            if text is not None and images is not None:
                 __snake_case      :Tuple 							=    image_features.pixel_values
                 return encoding
            elif text is not None:
                 return encoding
            else:
                 return BatchEncoding(data=dict(**a__     )      ,    tensor_type=a__     )



       def        __lowercase    (				self      ,    *a__      ,    **a__     )			->   str:






            '''simple docstring'''





            return self.tokenizer.batch_decode(*a__      ,    **a__     )



       def        __lowercase    (				self      ,    *a__      ,    **a__     )			->   List[str]:






            '''simple docstring'''





            return self.tokenizer.decode(*a__      ,    **a__     )



       @property
       def        __lowercase    (				self     )			->   Tuple:






            '''simple docstring'''





            __snake_case      :Dict 							=    self.tokenizer.model_input_names
            __snake_case      :Optional[Any] 							=    self.image_processor.model_input_names
            return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names     )     )



       @property
       def        __lowercase    (				self     )			->   str:






            '''simple docstring'''





            warnings.warn(
                """`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead."""      ,    a__      ,    )
            return self.image_processor_class



       @property
       def        __lowercase    (				self     )			->   Any:






            '''simple docstring'''





            warnings.warn(
                """`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead."""      ,    a__      ,    )
            return self.image_processor










lowerCamelCase__       		=  8.3_1_4_4_5_9_8






def 	UpperCamelCase	(							snake_case__  : float						,snake_case__  : float	):




     '''simple docstring'''






     if temperature < 0:
          raise Exception("""Temperature cannot be less than 0 K"""	)
     if molar_mass <= 0:
          raise Exception("""Molar mass cannot be less than or equal to 0 kg/mol"""	)
     else:
          return (3 * UNIVERSAL_GAS_CONSTANT * temperature / molar_mass) ** 0.5


if __name__ == "__main__":
     import doctest

     # run doctest
     doctest.testmod()

     # example
     lowerCamelCase__       		=  300
     lowerCamelCase__       		=  28
     lowerCamelCase__       		=  rms_speed_of_molecule(temperature, molar_mass)
     print(f'''Vrms of Nitrogen gas at 300 K is {vrms} m/s''')


