




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

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


@dataclass(frozen=UpperCAmelCase__     )
class 				UpperCamelCase_    ( UpperCAmelCase__     ):

    '''simple docstring'''






    UpperCAmelCase__							  =      field(default='''text-classification'''		,					metadata={'''include_in_asdict_even_if_is_default''': True}     )
    UpperCAmelCase__							  =      Features({'''text''': Value('''string'''     )}     )
    UpperCAmelCase__							  =      Features({'''labels''': ClassLabel}     )
    UpperCAmelCase__							  =      "text"
    UpperCAmelCase__							  =      "labels"


    def        SCREAMING_SNAKE_CASE							(			self      :	Tuple					, UpperCAmelCase__      :	List[Any])						->Dict:





           '''simple docstring'''

           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]					, UpperCAmelCase__):
                  raise ValueError(f"""Column {self.label_column} is not a ClassLabel.""")
           A__       =    copy.deepcopy(self)
           A__       =    self.label_schema.copy()
           A__       =    features[self.label_column]
           A__       =    label_schema
           return task_template





    @property
    def        SCREAMING_SNAKE_CASE							(			self      :	Optional[int])						->Dict[str, str]:





           '''simple docstring'''

           return {
               self.text_column: "text",
               self.label_column: "labels",
           }








def SCREAMING_SNAKE_CASE				(       lowercase_ ,				lowercase_						)   ->       int:



       """simple docstring"""

       return int(input_a == input_a == 0						)







def SCREAMING_SNAKE_CASE				(       )   ->       None:



       """simple docstring"""

       print('''Truth Table of NOR Gate:'''						)
       print('''|   Input 1   |  Input 2  | Output |'''						)
       print(f"""|      0      |    0      |  {nor_gate(0 ,				0						)}     |"""						)
       print(f"""|      0      |    1      |  {nor_gate(0 ,				1						)}     |"""						)
       print(f"""|      1      |    0      |  {nor_gate(1 ,				0						)}     |"""						)
       print(f"""|      1      |    1      |  {nor_gate(1 ,				1						)}     |"""						)


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  main()


