



import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import ClassLabel, Features, Image
from .base import TaskTemplate







@dataclass(frozen=__lowerCamelCase      )
class 	_snake_case							(			__lowerCamelCase      ):






   '''simple docstring'''






   A__	:      str    =		field(default="image-classification"      ,				metadata={"include_in_asdict_even_if_is_default": True}      )
   A__	:      ClassVar[Features]    =		Features({"image": Image()}      )
   A__	:      ClassVar[Features]    =		Features({"labels": ClassLabel}      )
   A__	:      str    =		"image"
   A__	:      str    =		"labels"


   def 	A__  (  self:			int   ,lowerCamelCase_:			List[str]				)     ->	Tuple:
       if self.label_column not in features:
           raise ValueError(F'''Column {self.label_column} is not present in features.'''				)
       if not isinstance(features[self.label_column]   ,__lowercase				):
           raise ValueError(F'''Column {self.label_column} is not a ClassLabel.'''				)
       UpperCAmelCase_			:    Optional[int]   						= copy.deepcopy(self				)
       UpperCAmelCase_			:    List[str]   						= self.label_schema.copy()
       UpperCAmelCase_			:    Any   						= features[self.label_column]
       UpperCAmelCase_			:    List[str]   						= label_schema
       return task_template






   @property
   def 	A__  (  self:			List[str]				)     ->	Optional[Any]:
       return {
           self.image_column: "image",
           self.label_column: "labels",
       }





def 			_lowerCAmelCase       (					__lowerCAmelCase  ,  __lowerCAmelCase      )   ->					int:


				"""simple docstring"""

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



def 			_lowerCAmelCase       (					)   ->					None:


				"""simple docstring"""

				assert or_gate(0  ,  0      ) == 0
				assert or_gate(0  ,  1      ) == 1
				assert or_gate(1  ,  0      ) == 1
				assert or_gate(1  ,  1      ) == 1


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

