'''simple docstring'''




def 						__snake_case (       lowerCAmelCase       :     Optional[Any]      ,  lowerCAmelCase       :     Dict			)     ->   int:
 return (input_a, input_a).count(0			) % 2



def 						__snake_case (       )     ->   None:
 assert xor_gate(0      ,  0			) == 0
 assert xor_gate(0      ,  1			) == 1
 assert xor_gate(1      ,  0			) == 1
 assert xor_gate(1      ,  1			) == 0


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




'''simple docstring'''




import unittest
from pathlib import Path

from transformers import is_vision_available, load_tool
from transformers.testing_utils import get_tests_dir

from .test_tools_common import ToolTesterMixin


if is_vision_available():
     from PIL import Image

class   _lowercase(     unittest.TestCase   ,_lowerCamelCase				):



   """simple docstring"""





   def 			snake_case	(							self:    Optional[int]	):
    __UpperCAmelCase         =					load_tool('image-captioning'	)
    self.tool.setup()
    __UpperCAmelCase         =					load_tool('image-captioning'			,remote=a	)





   def 			snake_case	(							self:    List[Any]	):
    __UpperCAmelCase         =					Image.open(Path(get_tests_dir('fixtures/tests_samples/COCO'	)	) / '000000039769.png'	)
    __UpperCAmelCase         =					self.tool(a	)
    self.assertEqual(a			,'two cats sleeping on a couch'	)





   def 			snake_case	(							self:    List[Any]	):
    __UpperCAmelCase         =					Image.open(Path(get_tests_dir('fixtures/tests_samples/COCO'	)	) / '000000039769.png'	)
    __UpperCAmelCase         =					self.remote_tool(a	)
    self.assertEqual(a			,'two cats sleeping on a couch'	)





   def 			snake_case	(							self:    Optional[Any]	):
    __UpperCAmelCase         =					Image.open(Path(get_tests_dir('fixtures/tests_samples/COCO'	)	) / '000000039769.png'	)
    __UpperCAmelCase         =					self.tool(image=a	)
    self.assertEqual(a			,'two cats sleeping on a couch'	)





   def 			snake_case	(							self:    Tuple	):
    __UpperCAmelCase         =					Image.open(Path(get_tests_dir('fixtures/tests_samples/COCO'	)	) / '000000039769.png'	)
    __UpperCAmelCase         =					self.remote_tool(image=a	)
    self.assertEqual(a			,'two cats sleeping on a couch'	)



