"""simple docstring"""


import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import AutoConfig


a							=logging.get_logger(__name__)






class    __UpperCAmelCase						(	__lowerCAmelCase	):
				A__      :   str  							=       '''speech-encoder-decoder'''
				A__      :   Union[str, Any]  							=       True

				def __init__(      self	, **_lowerCamelCase      ):
										super().__init__(**_lowerCamelCase      )
										if "encoder" not in kwargs or "decoder" not in kwargs:
																raise ValueError(
																    F'''A configuraton of type {self.model_type} cannot be instantiated because not both `encoder` and'''
																    F''' `decoder` sub-configurations are passed, but only {kwargs}'''      )

										lowerCamelCase__					=kwargs.pop("encoder"      )
										lowerCamelCase__					=encoder_config.pop("model_type"      )
										lowerCamelCase__					=kwargs.pop("decoder"      )
										lowerCamelCase__					=decoder_config.pop("model_type"      )

										lowerCamelCase__					=AutoConfig.for_model(_lowerCamelCase	, **_lowerCamelCase      )
										lowerCamelCase__					=AutoConfig.for_model(_lowerCamelCase	, **_lowerCamelCase      )
										lowerCamelCase__					=True

				@classmethod
				def 		_a	(      cls	, _lowerCamelCase	, _lowerCamelCase	, **_lowerCamelCase      ):
										logger.info("Setting `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config"      )
										lowerCamelCase__					=True
										lowerCamelCase__					=True

										return cls(encoder=encoder_config.to_dict()	, decoder=decoder_config.to_dict()	, **_lowerCamelCase      )






				def 		_a	(      self      ):
										lowerCamelCase__					=copy.deepcopy(self.__dict__      )
										lowerCamelCase__					=self.encoder.to_dict()
										lowerCamelCase__					=self.decoder.to_dict()
										lowerCamelCase__					=self.__class__.model_type
										return output



"""simple docstring"""


from __future__ import annotations





def 			lowerCamelCase_ (					__lowerCAmelCase				)							->					int | float:




						'''simple docstring'''



						if len(__lowerCAmelCase				) == 0:
												raise ValueError("find_max() arg is an empty sequence"				)
						lowerCamelCase__					=nums[0]
						for x in nums:
												if x > max_num:
																		lowerCamelCase__					=x
						return max_num


if __name__ == "__main__":
	import doctest

	doctest.testmod(verbose=True)


