





def   snake_case (UpperCAmelCase__     ,   UpperCAmelCase__  )	->    int:
  return 1 if input_a == input_a else 0

def   snake_case ()	->    None:
  assert xnor_gate(0     ,   0  ) == 1
  assert xnor_gate(0     ,   1  ) == 0
  assert xnor_gate(1     ,   0  ) == 0
  assert xnor_gate(1     ,   1  ) == 1


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







import unittest

from transformers import is_torch_available
from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow, torch_device


if is_torch_available():
   from transformers import AutoModelForSeqaSeqLM, AutoTokenizer




@require_torch
@require_sentencepiece
@require_tokenizers
class     _lowerCAmelCase(	unittest.TestCase ):





       """simple docstring"""







       @slow
       def       _a   ( self							):
         UpperCamelCase_: Optional[int]   				=    AutoModelForSeqaSeqLM.from_pretrained('google/mt5-small'  ,      return_dict=_lowerCamelCase							).to(_lowerCamelCase							)
         UpperCamelCase_: Dict   				=    AutoTokenizer.from_pretrained('google/mt5-small'							)

         UpperCamelCase_: Dict   				=    tokenizer('Hello there'  ,      return_tensors='pt'							).input_ids
         UpperCamelCase_: Optional[Any]   				=    tokenizer('Hi I am'  ,      return_tensors='pt'							).input_ids

         UpperCamelCase_: int   				=    model(input_ids.to(_lowerCamelCase							)  ,      labels=labels.to(_lowerCamelCase							)							).loss
         UpperCamelCase_: Tuple   				=    -(labels.shape[-1] * loss.item())

         UpperCamelCase_: Any   				=    -8_4.9_1_2_7
         self.assertTrue(abs(mtf_score - EXPECTED_SCORE							) < 1e-4							)