

def     __SCREAMING_SNAKE_CASE   (SCREAMING_SNAKE_CASE__    ,						SCREAMING_SNAKE_CASE__			):
						if a < 0 or b < 0:
												raise ValueError('''the value of both inputs must be positive'''			)
						snake_case_  =      str(bin(SCREAMING_SNAKE_CASE__			)			)[2:]  # remove the leading "0b"
						snake_case_  =      str(bin(SCREAMING_SNAKE_CASE__			)			)[2:]
						snake_case_  =      max(len(SCREAMING_SNAKE_CASE__			)    ,						len(SCREAMING_SNAKE_CASE__			)			)
						return "0b" + "".join(
						    str(int('''1''' in (char_a, char_b)			)			)
						    for char_a, char_b in zip(a_binary.zfill(SCREAMING_SNAKE_CASE__			)    ,						b_binary.zfill(SCREAMING_SNAKE_CASE__			)			)			)


if __name__ == "__main__":
					import doctest

					doctest.testmod()






import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging


_lowerCamelCase 					=      logging.get_logger(__name__)




class 	UpperCamelCase_							(  UpperCamelCase__     ):
							lowerCamelCase_							     =       "encoder-decoder"
							lowerCamelCase_							     =       True


							def __init__(				self     :Optional[int]				,					**__A     :str		) -> int:



									"""simple docstring"""



									super().__init__(**__A		)
									assert (
									    "encoder" in kwargs and "decoder" in kwargs
									), "Config has to be initialized with encoder and decoder config"
									SCREAMING_SNAKE_CASE__								=   kwargs.pop("""encoder"""		)
									SCREAMING_SNAKE_CASE__								=   encoder_config.pop("""model_type"""		)
									SCREAMING_SNAKE_CASE__								=   kwargs.pop("""decoder"""		)
									SCREAMING_SNAKE_CASE__								=   decoder_config.pop("""model_type"""		)

									from ..auto.configuration_auto import AutoConfig

									SCREAMING_SNAKE_CASE__								=   AutoConfig.for_model(__A				,					**__A		)
									SCREAMING_SNAKE_CASE__								=   AutoConfig.for_model(__A				,					**__A		)
									SCREAMING_SNAKE_CASE__								=   True


							@classmethod
							def   _snake_case	(				cls     :str				,					__A     :PretrainedConfig				,					__A     :PretrainedConfig				,					**__A     :List[str]		) -> PretrainedConfig:



									"""simple docstring"""



									logger.info("""Set `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config"""		)
									SCREAMING_SNAKE_CASE__								=   True
									SCREAMING_SNAKE_CASE__								=   True

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


							def   _snake_case	(				self     :str		) -> Union[str, Any]:



									"""simple docstring"""



									SCREAMING_SNAKE_CASE__								=   copy.deepcopy(self.__dict__		)
									SCREAMING_SNAKE_CASE__								=   self.encoder.to_dict()
									SCREAMING_SNAKE_CASE__								=   self.decoder.to_dict()
									SCREAMING_SNAKE_CASE__								=   self.__class__.model_type
									return output