






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

from ..features import Features, Sequence, Value
from .base import TaskTemplate
@dataclass(frozen=snake_case_       )
class 			lowerCAmelCase_							(					snake_case_       ):
							# `task` is not a ClassVar since we want it to be part of the `asdict` output for JSON serialization
							UpperCamelCase_		:str		   =     field(default='question-answering-extractive'  ,     metadata={'include_in_asdict_even_if_is_default': True}       )
							UpperCamelCase_		:ClassVar[Features]		   =     Features({'question': Value('string'       ), 'context': Value('string'       )}       )
							UpperCamelCase_		:ClassVar[Features]		   =     Features(
							    {
							        'answers': Sequence(
							            {
							                'text': Value('string'       ),
							                'answer_start': Value('int32'       ),
							            }       )
							    }       )
							UpperCamelCase_		:str		   =     "question"
							UpperCamelCase_		:str		   =     "context"
							UpperCamelCase_		:str		   =     "answers"




							@property
							def     __snake_case       ( self  : str						):
											return {self.question_column: "question", self.context_column: "context", self.answers_column: "answers"}










'''simple docstring'''



from __future__ import annotations
def        UpperCAmelCase (    A	:					list[int]       ,		A	:					int					):
							if len(A					) < k or k < 0:
														raise ValueError('''Invalid Input'''					)
							SCREAMING_SNAKE_CASE       :   Dict         =      sum(array[:k]					)
							for i in range(len(A					) - k					):
														SCREAMING_SNAKE_CASE       :   Optional[Any]         =      current_sum - array[i] + array[i + k]
														SCREAMING_SNAKE_CASE       :   Union[str, Any]         =      max(A       ,		A					)
							return max_sum


if __name__ == "__main__":
							from doctest import testmod
							from random import randint

							testmod()
							lowerCAmelCase_  :							Optional[int]             =    [randint(-1000, 1000) for i in range(100)]
							lowerCAmelCase_  :							Optional[int]             =    randint(0, 110)
							print(f'The maximum sum of {k} consecutive elements is {max_sum_in_array(array,k)}')




