




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

from ..features import ClassLabel, Features, Image
from .base import TaskTemplate
@dataclass(frozen=_a		)
class        __snake_case  (_a		):
				lowerCAmelCase__				=     field(default="image-classification"						,	metadata={"include_in_asdict_even_if_is_default": True}		)
				lowerCAmelCase__				=     Features({"image": Image()}		)
				lowerCAmelCase__				=     Features({"labels": ClassLabel}		)
				lowerCAmelCase__				=     "image"
				lowerCAmelCase__				=     "labels"



				def       SCREAMING_SNAKE_CASE       (      self      :		str		,	_UpperCAmelCase      :		Optional[int]      )  ->    str:





								'''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."      )
								_lowerCAmelCase    :    List[str]										=      copy.deepcopy(self      )
								_lowerCAmelCase    :    int										=      self.label_schema.copy()
								_lowerCAmelCase    :    List[Any]										=      features[self.label_column]
								_lowerCAmelCase    :    Tuple										=      label_schema
								return task_template



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





								'''simple docstring'''




								return {
								    self.image_column: "image",
								    self.label_column: "labels",
								}







def 							_UpperCAmelCase  (UpperCamelCase_ : int       ):
				'''simple docstring'''
				_lowerCAmelCase    :    int										=      n ** (1 / 3)
				return (val * val * val) == n


if __name__ == "__main__":
	print(perfect_cube(2_7))
	print(perfect_cube(4))

