



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

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

@dataclass(frozen=_A						)
class 	lowerCamelCase_    ( _A						):






						'''simple docstring'''
						a__   =  field(default="question-answering-extractive"						,metadata={"include_in_asdict_even_if_is_default": True}						)
						a__   =  Features({"question": Value("string"						), "context": Value("string"						)}						)
						a__   =  Features(
						    {
						        "answers": Sequence(
						            {
						                "text": Value("string"						),
						                "answer_start": Value("int32"						),
						            }						)
						    }						)
						a__   =  "question"
						a__   =  "context"
						a__   =  "answers"







						@property
						def 			SCREAMING_SNAKE_CASE__		(	self      :			Union[str, Any] )      ->				Dict[str, str]:
									return {self.question_column: "question", self.context_column: "context", self.answers_column: "answers"}




from collections import deque

from .hash_table import HashTable

class 	lowerCamelCase_    ( _A						):






						'''simple docstring'''







						def __init__(	self      :			Union[str, Any]	,	*__lowerCamelCase      :			Dict	,	**__lowerCamelCase      :			int )      ->				Optional[int]:
									super().__init__(*__lowerCamelCase	,	**__lowerCamelCase )







						def 			SCREAMING_SNAKE_CASE__		(	self      :			List[str]	,	__lowerCamelCase      :			List[str]	,	__lowerCamelCase      :			Union[str, Any] )      ->				Union[str, Any]:
									A							:					Optional[Any]              =						deque([] ) if self.values[key] is None else self.values[key]
									self.values[key].appendleft(__lowerCamelCase )
									A							:					Dict              =						self.values[key]







						def 			SCREAMING_SNAKE_CASE__		(	self      :			Any )      ->				str:
									return (
									    sum(self.charge_factor - len(__lowerCamelCase ) for slot in self.values )
									    / self.size_table
									    * self.charge_factor
									)







						def 			SCREAMING_SNAKE_CASE__		(	self      :			Optional[Any]	,	__lowerCamelCase      :			Any	,	__lowerCamelCase      :			List[Any]=None )      ->				Optional[int]:
									if not (
									    len(self.values[key] ) == self.charge_factor and self.values.count(__lowerCamelCase ) == 0
									):
												return key
									return super()._collision_resolution(__lowerCamelCase	,	__lowerCamelCase )