






"""simple docstring"""







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

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





@dataclass(frozen=a_  )
class   UpperCamelCase_ (       a_  ):
  # `task` is not a ClassVar since we want it to be part of the `asdict` output for JSON serialization
  _A       :					str				=	field(default='text-classification'   ,					metadata={'include_in_asdict_even_if_is_default': True}  )
  _A       :					ClassVar[Features]				=	Features({'text': Value('string'  )}  )
  _A       :					ClassVar[Features]				=	Features({'labels': ClassLabel}  )
  _A       :					str				=	"text"
  _A       :					str				=	"labels"



  def 		UpperCamelCase_				(      self ,		snake_case__				)			->			Tuple:



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



  @property
  def 		UpperCamelCase_				(      self				)			->			Dict[str, str]:



         """simple docstring"""





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








"""simple docstring"""







import random
from typing import Any






def       _lowerCAmelCase       (      lowerCAmelCase		):







       '''simple docstring'''
       for _ in range(len(lowerCAmelCase		)		):
              UpperCAmelCase	    =			random.randint(0	,      len(lowerCAmelCase		) - 1		)
              UpperCAmelCase	    =			random.randint(0	,      len(lowerCAmelCase		) - 1		)
              UpperCAmelCase    ,       UpperCAmelCase	    =			data[b], data[a]
       return data


if __name__ == "__main__":
 lowerCAmelCase_	:    Tuple            =      [0, 1, 2, 3, 4, 5, 6, 7]
 lowerCAmelCase_	:    List[str]            =      ['''python''', '''says''', '''hello''', '''!''']
 print('''Fisher-Yates Shuffle:''')
 print('''List''', integers, strings)
 print('''FY Shuffle''', fisher_yates_shuffle(integers), fisher_yates_shuffle(strings))
