
from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCamelCase__          =		logging.get_logger(__name__)

lowerCamelCase__          =		{
    """studio-ousia/luke-base""": """https://huggingface.co/studio-ousia/luke-base/resolve/main/config.json""",
    """studio-ousia/luke-large""": """https://huggingface.co/studio-ousia/luke-large/resolve/main/config.json""",
}







class      A__							(     __magic_name__	):
				lowercase			    =  'luke'






				def __init__(						self					:      int    ,     a					:      Optional[Any]=50_267    ,     a					:      List[str]=500_000    ,     a					:      Dict=768    ,     a					:      Optional[int]=256    ,     a					:      Any=12    ,     a					:      int=12    ,     a					:      Optional[Any]=3_072    ,     a					:      Any="gelu"    ,     a					:      Union[str, Any]=0.1    ,     a					:      str=0.1    ,     a					:      str=512    ,     a					:      List[Any]=2    ,     a					:      Any=0.0_2    ,     a					:      List[str]=1E-12    ,     a					:      Tuple=True    ,     a					:      int=None    ,     a					:      Union[str, Any]=1    ,     a					:      List[str]=0    ,     a					:      List[Any]=2    ,     **a					:      Optional[int]    ,     ):






							'''simple docstring'''







							super().__init__(pad_token_id=a    ,     bos_token_id=a    ,     eos_token_id=a    ,     **a   )

							lowerCAmelCase__      :      Tuple         =		vocab_size
							lowerCAmelCase__      :      str         =		entity_vocab_size
							lowerCAmelCase__      :      List[Any]         =		hidden_size
							lowerCAmelCase__      :      Optional[int]         =		entity_emb_size
							lowerCAmelCase__      :      Optional[int]         =		num_hidden_layers
							lowerCAmelCase__      :      Dict         =		num_attention_heads
							lowerCAmelCase__      :      Optional[int]         =		hidden_act
							lowerCAmelCase__      :      Dict         =		intermediate_size
							lowerCAmelCase__      :      List[Any]         =		hidden_dropout_prob
							lowerCAmelCase__      :      Optional[Any]         =		attention_probs_dropout_prob
							lowerCAmelCase__      :      Tuple         =		max_position_embeddings
							lowerCAmelCase__      :      Optional[int]         =		type_vocab_size
							lowerCAmelCase__      :      str         =		initializer_range
							lowerCAmelCase__      :      Tuple         =		layer_norm_eps
							lowerCAmelCase__      :      str         =		use_entity_aware_attention
							lowerCAmelCase__      :      int         =		classifier_dropout

class      A__							:






				def __init__(						self					:      Dict    ,     a					:      list[int]   ):






							'''simple docstring'''







							lowerCAmelCase__      :      Union[str, Any]         =		len(a   )
							lowerCAmelCase__      :      Optional[Any]         =		[0] * len_array

							if len_array > 0:
										lowerCAmelCase__      :      List[Any]         =		array[0]

							for i in range(1    ,     a   ):
										lowerCAmelCase__      :      Optional[int]         =		self.prefix_sum[i - 1] + array[i]






				def 							_lowerCamelCase		(						self					:      int    ,     a					:      int    ,     a					:      int   ):






							'''simple docstring'''







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

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






				def 							_lowerCamelCase		(						self					:      Optional[Any]    ,     a					:      int   ):






							'''simple docstring'''







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

										sums.add(a   )

							return False


if __name__ == "__main__":
					import doctest

					doctest.testmod()