






"""simple docstring"""







import copy

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


_UpperCamelCase     			=  logging.get_logger(__name__)







class 					lowerCamelCase__					(       snake_case_ ):
    SCREAMING_SNAKE_CASE		=			'speech-encoder-decoder'
    SCREAMING_SNAKE_CASE		=			True






    def __init__( self	,**A					):
          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}'''					)

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

          UpperCAmelCase							=       AutoConfig.for_model(lowerCamelCase_	,**lowerCamelCase_					)
          UpperCAmelCase							=       AutoConfig.for_model(lowerCamelCase_	,**lowerCamelCase_					)
          UpperCAmelCase							=       True






    @classmethod
    def 				_UpperCamelCase							( cls	,A	,A	,**A					):
          logger.info("""Setting `config.is_decoder=True` and `config.add_cross_attention=True` for decoder_config"""					)
          UpperCAmelCase							=       True
          UpperCAmelCase							=       True

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






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











"""simple docstring"""
def        lowerCamelCase_  (						_lowerCamelCase				):
 return 1 if input_a == 0 else 0






def        lowerCamelCase_  (						):
 assert not_gate(0				) == 1
 assert not_gate(1				) == 0


if __name__ == "__main__":
      print(not_gate(0))
      print(not_gate(1))

