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

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




@dataclass(frozen=UpperCAmelCase					)
class    SCREAMING_SNAKE_CASE__     (	UpperCAmelCase					):





	'''simple docstring'''



	_UpperCAmelCase       :		str       =					field(default="language-modeling"							,metadata={"include_in_asdict_even_if_is_default": True}					)

	_UpperCAmelCase       :		ClassVar[Features]       =					Features({"text": Value("string"					)}					)
	_UpperCAmelCase       :		ClassVar[Features]       =					Features({}					)
	_UpperCAmelCase       :		str       =					"text"



	@property
	def  A							(  self	:    str	):


				'''simple docstring'''


				return {self.text_column: "text"}

class    SCREAMING_SNAKE_CASE__     :





	'''simple docstring'''



	def __init__(  self	:    List[str]			,  lowercase	:    list[int]	):


				'''simple docstring'''


				_snake_case		=			len(lowercase	)
				_snake_case		=			[0] * len_array

				if len_array > 0:
							_snake_case		=			array[0]

				for i in range(1			,  lowercase	):
							_snake_case		=			self.prefix_sum[i - 1] + array[i]



	def  A							(  self	:    Optional[Any]			,  lowercase	:    int			,  lowercase	:    int	):


				'''simple docstring'''


				if start == 0:
							return self.prefix_sum[end]

				return self.prefix_sum[end] - self.prefix_sum[start - 1]





	def  A							(  self	:    Union[str, Any]			,  lowercase	:    int	):


				'''simple docstring'''


				_snake_case		=			{0}
				for sum_item in self.prefix_sum:
							if sum_item - target_sum in sums:
										return True

							sums.add(lowercase	)

				return False


if __name__ == "__main__":
			import doctest

			doctest.testmod()