





"""simple docstring"""
from typing import Callable, Optional

from .. import Features
from ..packaged_modules.generator.generator import Generator
from .abc import AbstractDatasetInputStream






class  _SCREAMING_SNAKE_CASE(       A  ):




       def __init__(						self		,SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__ = None		,SCREAMING_SNAKE_CASE__ = None		,SCREAMING_SNAKE_CASE__ = False		,SCREAMING_SNAKE_CASE__ = False		,SCREAMING_SNAKE_CASE__ = None		,SCREAMING_SNAKE_CASE__ = None		,**SCREAMING_SNAKE_CASE__		,)      ->				List[str]:





             """simple docstring"""






             super().__init__(
                 features=SCREAMING_SNAKE_CASE__		,cache_dir=SCREAMING_SNAKE_CASE__		,keep_in_memory=SCREAMING_SNAKE_CASE__		,streaming=SCREAMING_SNAKE_CASE__		,num_proc=SCREAMING_SNAKE_CASE__		,**SCREAMING_SNAKE_CASE__		,)
             __SCREAMING_SNAKE_CASE       :List[Any]		    =  Generator(
                 cache_dir=SCREAMING_SNAKE_CASE__		,features=SCREAMING_SNAKE_CASE__		,generator=SCREAMING_SNAKE_CASE__		,gen_kwargs=SCREAMING_SNAKE_CASE__		,**SCREAMING_SNAKE_CASE__		,)




       def    _UpperCamelCase					(						self							)      ->				Dict:





             """simple docstring"""






             if self.streaming:
                   __SCREAMING_SNAKE_CASE       :Optional[int]		    =  self.builder.as_streaming_dataset(split='''train'''							)
             # Build regular (map-style) dataset
             else:
                   __SCREAMING_SNAKE_CASE       :List[Any]		    =  None
                   __SCREAMING_SNAKE_CASE       :List[Any]		    =  None
                   __SCREAMING_SNAKE_CASE       :Any		    =  None
                   __SCREAMING_SNAKE_CASE       :List[str]		    =  None

                   self.builder.download_and_prepare(
                       download_config=SCREAMING_SNAKE_CASE__		,download_mode=SCREAMING_SNAKE_CASE__		,verification_mode=SCREAMING_SNAKE_CASE__		,base_path=SCREAMING_SNAKE_CASE__		,num_proc=self.num_proc		,)
                   __SCREAMING_SNAKE_CASE       :Union[str, Any]		    =  self.builder.as_dataset(
                       split='''train'''		,verification_mode=SCREAMING_SNAKE_CASE__		,in_memory=self.keep_in_memory							)
             return dataset






"""simple docstring"""
def 					__lowerCamelCase       (							a_					:		int			,       a_					:		int							)      ->				int:
      return int((input_a, input_a).count(0							) == 0							)



def 					__lowerCamelCase       (							)      ->				None:
      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))