
'''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=__snake_case		)
class 					A							(				__snake_case		):
     # `task` is not a ClassVar since we want it to be part of the `asdict` output for JSON serialization
     __magic_name__          =						field(default='''text-classification'''       ,     metadata={'''include_in_asdict_even_if_is_default''': True}		)
     __magic_name__          =						Features({'''text''': Value('''string'''		)}		)
     __magic_name__          =						Features({'''labels''': ClassLabel}		)
     __magic_name__          =						"text"
     __magic_name__          =						"labels"





     def 							__lowerCAmelCase				(				self		,     SCREAMING_SNAKE_CASE      )					->							List[Any]:






         """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]		,     SCREAMING_SNAKE_CASE      ):
             raise ValueError(F'Column {self.label_column} is not a ClassLabel.'      )
         A			:  str   =		copy.deepcopy(self      )
         A			:  Optional[int]   =		self.label_schema.copy()
         A			:  int   =		features[self.label_column]
         A			:  int   =		label_schema
         return task_template





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






         """simple docstring"""






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






'''simple docstring'''




def 						lowerCAmelCase_							(  snake_case__		):




    '''simple docstring'''



    if len(snake_case__		) <= 1:
        return [tuple(snake_case__		)]

    A			:  int   =		[]

    def generate(snake_case__						,							snake_case__		):
        if k == 1:
            res.append(tuple(arr[:]		)		)
            return

        generate(k - 1						,							snake_case__		)

        for i in range(k - 1		):
            if k % 2 == 0:  # k is even
                A,    A			:  Any   =		arr[k - 1], arr[i]
            else:  # k is odd
                A,    A			:  List[str]   =		arr[k - 1], arr[0]
            generate(k - 1						,							snake_case__		)

    generate(len(snake_case__		)						,							snake_case__		)
    return res


if __name__ == "__main__":
      lowercase     :							int       						=     input('Enter numbers separated by a comma:\n').strip()
      lowercase     :							Dict       						=     [int(item) for item in user_input.split(',')]
      print(heaps(arr))




