
"""simple docstring"""



from dataclasses import asdict, dataclass
from typing import Optional

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


UpperCamelCase__          =	logging.get_logger(__name__)

# TODO Update this
UpperCamelCase__          =	{
    'facebook/esm-1b': 'https://huggingface.co/facebook/esm-1b/resolve/main/config.json',
    # See all ESM models at https://huggingface.co/models?filter=esm
}





class 				a			(					lowercase      ):
      UpperCamelCase							:   str           =     """esm"""



      def __init__(   self     ,	UpperCamelCase_=None     ,	UpperCamelCase_=None     ,	UpperCamelCase_=None     ,	UpperCamelCase_=768     ,	UpperCamelCase_=12     ,	UpperCamelCase_=12     ,	UpperCamelCase_=3_072     ,	UpperCamelCase_=0.1     ,	UpperCamelCase_=0.1     ,	UpperCamelCase_=1_026     ,	UpperCamelCase_=0.02     ,	UpperCamelCase_=1E-12     ,	UpperCamelCase_="absolute"     ,	UpperCamelCase_=True     ,	UpperCamelCase_=None     ,	UpperCamelCase_=False     ,	UpperCamelCase_=False     ,	UpperCamelCase_=None     ,	UpperCamelCase_=None     ,	**UpperCamelCase_     ,	):
          super().__init__(pad_token_id=UpperCamelCase_     ,	mask_token_id=UpperCamelCase_     ,	**UpperCamelCase_      )

          UpperCAmelCase__	:      Optional[int]     							=					vocab_size
          UpperCAmelCase__	:      Dict     							=					hidden_size
          UpperCAmelCase__	:      List[Any]     							=					num_hidden_layers
          UpperCAmelCase__	:      int     							=					num_attention_heads
          UpperCAmelCase__	:      Union[str, Any]     							=					intermediate_size
          UpperCAmelCase__	:      Optional[Any]     							=					hidden_dropout_prob
          UpperCAmelCase__	:      List[str]     							=					attention_probs_dropout_prob
          UpperCAmelCase__	:      Dict     							=					max_position_embeddings
          UpperCAmelCase__	:      Dict     							=					initializer_range
          UpperCAmelCase__	:      Any     							=					layer_norm_eps
          UpperCAmelCase__	:      Optional[int]     							=					position_embedding_type
          UpperCAmelCase__	:      Union[str, Any]     							=					use_cache
          UpperCAmelCase__	:      str     							=					emb_layer_norm_before
          UpperCAmelCase__	:      List[str]     							=					token_dropout
          UpperCAmelCase__	:      List[Any]     							=					is_folding_model
          if is_folding_model:
              if esmfold_config is None:
                  logger.info('No esmfold_config supplied for folding model, using default values.'      )
                  UpperCAmelCase__	:      str     							=					EsmFoldConfig()
              elif isinstance(UpperCamelCase_     ,	UpperCamelCase_      ):
                  UpperCAmelCase__	:      Dict     							=					EsmFoldConfig(**UpperCamelCase_      )
              UpperCAmelCase__	:      Any     							=					esmfold_config
              if vocab_list is None:
                  logger.warning('No vocab_list supplied for folding model, assuming the ESM-2 vocabulary!'      )
                  UpperCAmelCase__	:      Dict     							=					get_default_vocab_list()
              else:
                  UpperCAmelCase__	:      Optional[int]     							=					vocab_list
          else:
              UpperCAmelCase__	:      str     							=					None
              UpperCAmelCase__	:      str     							=					None
          if self.esmfold_config is not None and getattr(self.esmfold_config     ,	'use_esm_attn_map'     ,	UpperCamelCase_      ):
              raise ValueError('The HuggingFace port of ESMFold does not support use_esm_attn_map at this time!'      )



      def  __snake_case							(   self      ):
          UpperCAmelCase__	:      Optional[int]     							=					super().to_dict()
          if isinstance(self.esmfold_config     ,	UpperCamelCase_      ):
              UpperCAmelCase__	:      Optional[int]     							=					self.esmfold_config.to_dict()
          return output





@dataclass
class 				a			:
      UpperCamelCase							:   str           =     None
      UpperCamelCase							:   bool           =     True
      UpperCamelCase							:   bool           =     False
      UpperCamelCase							:   bool           =     False
      UpperCamelCase							:   bool           =     False
      UpperCamelCase							:   float           =     0

      UpperCamelCase							:   bool           =     True
      UpperCamelCase							:   bool           =     False

      UpperCamelCase							:   int           =     1_2_8
      UpperCamelCase							:   "TrunkConfig"           =     None



      def  __snake_case							(   self      ):
          if self.trunk is None:
              UpperCAmelCase__	:      Dict     							=					TrunkConfig()
          elif isinstance(self.trunk     ,	UpperCamelCase_      ):
              UpperCAmelCase__	:      Any     							=					TrunkConfig(**self.trunk      )



      def  __snake_case							(   self      ):
          UpperCAmelCase__	:      Dict     							=					asdict(self      )
          UpperCAmelCase__	:      Union[str, Any]     							=					self.trunk.to_dict()
          return output





@dataclass
class 				a			:
      UpperCamelCase							:   int           =     4_8
      UpperCamelCase							:   int           =     1_0_2_4
      UpperCamelCase							:   int           =     1_2_8
      UpperCamelCase							:   int           =     3_2
      UpperCamelCase							:   int           =     3_2
      UpperCamelCase							:   int           =     3_2
      UpperCamelCase							:   float           =     0
      UpperCamelCase							:   float           =     0
      UpperCamelCase							:   bool           =     False
      UpperCamelCase							:   int           =     4
      UpperCamelCase							:   Optional[int]           =     1_2_8
      UpperCamelCase							:   "StructureModuleConfig"           =     None



      def  __snake_case							(   self      ):
          if self.structure_module is None:
              UpperCAmelCase__	:      Optional[Any]     							=					StructureModuleConfig()
          elif isinstance(self.structure_module     ,	UpperCamelCase_      ):
              UpperCAmelCase__	:      Optional[Any]     							=					StructureModuleConfig(**self.structure_module      )

          if self.max_recycles <= 0:
              raise ValueError(F'''`max_recycles` should be positive, got {self.max_recycles}.'''      )
          if self.sequence_state_dim % self.sequence_state_dim != 0:
              raise ValueError(
                  '`sequence_state_dim` should be a round multiple of `sequence_state_dim`, got'
                  F''' {self.sequence_state_dim} and {self.sequence_state_dim}.'''      )
          if self.pairwise_state_dim % self.pairwise_state_dim != 0:
              raise ValueError(
                  '`pairwise_state_dim` should be a round multiple of `pairwise_state_dim`, got'
                  F''' {self.pairwise_state_dim} and {self.pairwise_state_dim}.'''      )

          UpperCAmelCase__	:      Optional[int]     							=					self.sequence_state_dim // self.sequence_head_width
          UpperCAmelCase__	:      List[str]     							=					self.pairwise_state_dim // self.pairwise_head_width

          if self.sequence_state_dim != sequence_num_heads * self.sequence_head_width:
              raise ValueError(
                  '`sequence_state_dim` should be equal to `sequence_num_heads * sequence_head_width, got'
                  F''' {self.sequence_state_dim} != {sequence_num_heads} * {self.sequence_head_width}.'''      )
          if self.pairwise_state_dim != pairwise_num_heads * self.pairwise_head_width:
              raise ValueError(
                  '`pairwise_state_dim` should be equal to `pairwise_num_heads * pairwise_head_width, got'
                  F''' {self.pairwise_state_dim} != {pairwise_num_heads} * {self.pairwise_head_width}.'''      )
          if self.pairwise_state_dim % 2 != 0:
              raise ValueError(F'''`pairwise_state_dim` should be even, got {self.pairwise_state_dim}.'''      )

          if self.dropout >= 0.4:
              raise ValueError(F'''`dropout` should not be greater than 0.4, got {self.dropout}.'''      )



      def  __snake_case							(   self      ):
          UpperCAmelCase__	:      str     							=					asdict(self      )
          UpperCAmelCase__	:      Union[str, Any]     							=					self.structure_module.to_dict()
          return output





@dataclass
class 				a			:
      UpperCamelCase							:   int           =     3_8_4
      UpperCamelCase							:   int           =     1_2_8
      UpperCamelCase							:   int           =     1_6
      UpperCamelCase							:   int           =     1_2_8
      UpperCamelCase							:   int           =     1_2
      UpperCamelCase							:   int           =     4
      UpperCamelCase							:   int           =     8
      UpperCamelCase							:   float           =     0.1
      UpperCamelCase							:   int           =     8
      UpperCamelCase							:   int           =     1
      UpperCamelCase							:   int           =     2
      UpperCamelCase							:   int           =     7
      UpperCamelCase							:   int           =     1_0
      UpperCamelCase							:   float           =     1E-8
      UpperCamelCase							:   float           =     1E5



      def  __snake_case							(   self      ):
          return asdict(self      )




def 					lowerCamelCase   (     ):
    return (
        "<cls>",
        "<pad>",
        "<eos>",
        "<unk>",
        "L",
        "A",
        "G",
        "V",
        "S",
        "E",
        "R",
        "T",
        "I",
        "D",
        "P",
        "K",
        "Q",
        "N",
        "F",
        "Y",
        "M",
        "H",
        "W",
        "C",
        "X",
        "B",
        "U",
        "Z",
        "O",
        ".",
        "-",
        "<null_1>",
        "<mask>",
    )



"""simple docstring"""



def 					lowerCamelCase   (     _snake_case    ,_snake_case ):
    return int((input_a, input_a).count(0 ) == 0 )
def 					lowerCamelCase   (     ):
    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))

