
"""simple docstring"""

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


SCREAMING_SNAKE_CASE_    					=						logging.get_logger(__name__)

SCREAMING_SNAKE_CASE_    					=						{
    '''funnel-transformer/small''': '''https://huggingface.co/funnel-transformer/small/resolve/main/config.json''',
    '''funnel-transformer/small-base''': '''https://huggingface.co/funnel-transformer/small-base/resolve/main/config.json''',
    '''funnel-transformer/medium''': '''https://huggingface.co/funnel-transformer/medium/resolve/main/config.json''',
    '''funnel-transformer/medium-base''': '''https://huggingface.co/funnel-transformer/medium-base/resolve/main/config.json''',
    '''funnel-transformer/intermediate''': (
        '''https://huggingface.co/funnel-transformer/intermediate/resolve/main/config.json'''
    ),
    '''funnel-transformer/intermediate-base''': (
        '''https://huggingface.co/funnel-transformer/intermediate-base/resolve/main/config.json'''
    ),
    '''funnel-transformer/large''': '''https://huggingface.co/funnel-transformer/large/resolve/main/config.json''',
    '''funnel-transformer/large-base''': '''https://huggingface.co/funnel-transformer/large-base/resolve/main/config.json''',
    '''funnel-transformer/xlarge''': '''https://huggingface.co/funnel-transformer/xlarge/resolve/main/config.json''',
    '''funnel-transformer/xlarge-base''': '''https://huggingface.co/funnel-transformer/xlarge-base/resolve/main/config.json''',
}
class      _UpperCAmelCase							(		__SCREAMING_SNAKE_CASE							):
						__SCREAMING_SNAKE_CASE   :							int							      =	"funnel"
						__SCREAMING_SNAKE_CASE   :							Tuple							      =	{
						    "hidden_size": "d_model",
						    "num_attention_heads": "n_head",
						}




						def __init__(							self   ,       lowercase_=3_0_5_2_2   ,       lowercase_=[4, 4, 4]   ,       lowercase_=None   ,       lowercase_=2   ,       lowercase_=7_6_8   ,       lowercase_=1_2   ,       lowercase_=6_4   ,       lowercase_=3_0_7_2   ,       lowercase_="gelu_new"   ,       lowercase_=0.1   ,       lowercase_=0.1   ,       lowercase_=0.0   ,       lowercase_=0.1   ,       lowercase_=None   ,       lowercase_=1E-9   ,       lowercase_="mean"   ,       lowercase_="relative_shift"   ,       lowercase_=True   ,       lowercase_=True   ,       lowercase_=True   ,       **lowercase_   ,       )						->					Union[str, Any]:
										UpperCAmelCase									=					vocab_size
										UpperCAmelCase									=					block_sizes
										UpperCAmelCase									=					[1] * len(__snake_case							) if block_repeats is None else block_repeats
										assert len(__snake_case							) == len(
										    self.block_repeats							), "`block_sizes` and `block_repeats` should have the same length."
										UpperCAmelCase									=					num_decoder_layers
										UpperCAmelCase									=					d_model
										UpperCAmelCase									=					n_head
										UpperCAmelCase									=					d_head
										UpperCAmelCase									=					d_inner
										UpperCAmelCase									=					hidden_act
										UpperCAmelCase									=					hidden_dropout
										UpperCAmelCase									=					attention_dropout
										UpperCAmelCase									=					activation_dropout
										UpperCAmelCase									=					initializer_range
										UpperCAmelCase									=					initializer_std
										UpperCAmelCase									=					layer_norm_eps
										assert pooling_type in [
										    "mean",
										    "max",
										], F"Got {pooling_type} for `pooling_type` but only 'mean' and 'max' are supported."
										UpperCAmelCase									=					pooling_type
										assert attention_type in [
										    "relative_shift",
										    "factorized",
										], F"Got {attention_type} for `attention_type` but only 'relative_shift' and 'factorized' are supported."
										UpperCAmelCase									=					attention_type
										UpperCAmelCase									=					separate_cls
										UpperCAmelCase									=					truncate_seq
										UpperCAmelCase									=					pool_q_only

										super().__init__(**__snake_case							)




						@property
						def     a_      (							self							)						->					Any:
										return sum(self.block_sizes							)




						@num_hidden_layers.setter
						def     a_      (							self   ,       lowercase_							)						->					Optional[int]:
										raise NotImplementedError(
										    'This model does not support the setting of `num_hidden_layers`. Please set `block_sizes`.'							)




						@property
						def     a_      (							self							)						->					Optional[Any]:
										return len(self.block_sizes							)




						@num_blocks.setter
						def     a_      (							self   ,       lowercase_							)						->					Union[str, Any]:
										raise NotImplementedError('This model does not support the setting of `num_blocks`. Please set `block_sizes`.'							)





"""simple docstring"""

def     lowercase__						(					lowerCAmelCase				:					int ,				lowerCAmelCase				:					int ) ->      int:






    """simple docstring"""




    return int((input_a, input_a).count(0 ) == 0 )




def     lowercase__						(					) ->      None:






    """simple docstring"""




    assert and_gate(0 ,				0 ) == 0
    assert and_gate(0 ,				1 ) == 0
    assert and_gate(1 ,				0 ) == 0
    assert and_gate(1 ,				1 ) == 1


if __name__ == "__main__":
   test_and_gate()
   print(and_gate(1, 0))
   print(and_gate(0, 0))
   print(and_gate(0, 1))
   print(and_gate(1, 1))



