






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


lowercase     :							Optional[int]	     =			logging.get_logger(__name__)

lowercase     :							int	     =			{
    '''google/reformer-crime-and-punishment''': (
        '''https://huggingface.co/google/reformer-crime-and-punishment/resolve/main/config.json'''
    ),
    '''google/reformer-enwik8''': '''https://huggingface.co/google/reformer-enwik8/resolve/main/config.json''',
}




class 						UpperCAmelCase_  (		SCREAMING_SNAKE_CASE__    ):


						'''simple docstring'''




						A   :      List[str]						 =    'reformer'
						A   :      Tuple						 =    ['past_buckets_states']
						A   :      Union[str, Any]						 =    {}






						def __init__(		self						, _SCREAMING_SNAKE_CASE=64						, _SCREAMING_SNAKE_CASE=["local", "lsh", "local", "lsh", "local", "lsh"]						, _SCREAMING_SNAKE_CASE=1.0						, _SCREAMING_SNAKE_CASE=True						, _SCREAMING_SNAKE_CASE=[64, 64]						, _SCREAMING_SNAKE_CASE=[64, 192]						, _SCREAMING_SNAKE_CASE=0						, _SCREAMING_SNAKE_CASE=2						, _SCREAMING_SNAKE_CASE=512						, _SCREAMING_SNAKE_CASE=None						, _SCREAMING_SNAKE_CASE="relu"						, _SCREAMING_SNAKE_CASE=0.05						, _SCREAMING_SNAKE_CASE=256						, _SCREAMING_SNAKE_CASE=0.02						, _SCREAMING_SNAKE_CASE=False						, _SCREAMING_SNAKE_CASE=1e-12						, _SCREAMING_SNAKE_CASE=1						, _SCREAMING_SNAKE_CASE=0						, _SCREAMING_SNAKE_CASE=0.05						, _SCREAMING_SNAKE_CASE=64						, _SCREAMING_SNAKE_CASE=64						, _SCREAMING_SNAKE_CASE=0.0						, _SCREAMING_SNAKE_CASE=1						, _SCREAMING_SNAKE_CASE=0						, _SCREAMING_SNAKE_CASE=4096						, _SCREAMING_SNAKE_CASE=12						, _SCREAMING_SNAKE_CASE=None						, _SCREAMING_SNAKE_CASE=1						, _SCREAMING_SNAKE_CASE=0						, _SCREAMING_SNAKE_CASE=320						, _SCREAMING_SNAKE_CASE=False						, _SCREAMING_SNAKE_CASE=True						, _SCREAMING_SNAKE_CASE=None						, **_SCREAMING_SNAKE_CASE						, )       -> Optional[Any]:
								snake_case_ :							Tuple         =				hash_seed
								snake_case_ :							Optional[int]         =				vocab_size
								snake_case_ :							List[Any]         =				attention_head_size
								snake_case_ :							List[str]         =				hidden_size
								snake_case_ :							List[str]         =				num_attention_heads
								snake_case_ :							Dict         =				num_hashes
								snake_case_ :							List[str]         =				len(_SCREAMING_SNAKE_CASE )
								snake_case_ :							Dict         =				tuple(_SCREAMING_SNAKE_CASE ) if isinstance(_SCREAMING_SNAKE_CASE						, _SCREAMING_SNAKE_CASE ) else num_buckets
								snake_case_ :							Optional[int]         =				lsh_attn_chunk_length
								snake_case_ :							List[Any]         =				local_attn_chunk_length
								snake_case_ :							Any         =				lsh_num_chunks_after
								snake_case_ :							int         =				lsh_num_chunks_before
								snake_case_ :							Union[str, Any]         =				local_num_chunks_after
								snake_case_ :							Optional[Any]         =				local_num_chunks_before
								snake_case_ :							Union[str, Any]         =				hidden_act
								snake_case_ :							Any         =				feed_forward_size
								snake_case_ :							List[Any]         =				hidden_dropout_prob
								snake_case_ :							Tuple         =				lsh_attention_probs_dropout_prob
								snake_case_ :							Optional[int]         =				local_attention_probs_dropout_prob
								snake_case_ :							List[Any]         =				max_position_embeddings
								snake_case_ :							int         =				initializer_range
								snake_case_ :							List[str]         =				layer_norm_eps
								snake_case_ :							Union[str, Any]         =				axial_pos_embds
								snake_case_ :							Optional[Any]         =				tuple(_SCREAMING_SNAKE_CASE )
								snake_case_ :							Optional[int]         =				tuple(_SCREAMING_SNAKE_CASE )
								snake_case_ :							str         =				axial_norm_std
								snake_case_ :							int         =				chunk_size_lm_head
								snake_case_ :							Dict         =				attn_layers
								snake_case_ :							Optional[Any]         =				use_cache
								snake_case_ :							Optional[Any]         =				classifier_dropout
								super().__init__(
								    pad_token_id=_SCREAMING_SNAKE_CASE						, eos_token_id=_SCREAMING_SNAKE_CASE						, is_decoder=_SCREAMING_SNAKE_CASE						, tie_word_embeddings=_SCREAMING_SNAKE_CASE						, **_SCREAMING_SNAKE_CASE						, )








from __future__ import annotations

def    lowerCAmelCase__		(			_a				:	list[int]     ,					_a				:	int			):
		snake_case_       ,				snake_case_ :							Tuple         =				0, len(_a			) - 1
		while start_ind <= end_ind:
				if array[start_ind] == search_item:
						return start_ind
				elif array[end_ind] == search_item:
						return end_ind
				else:
						start_ind += 1
						end_ind -= 1
    # returns -1 if search_item is not found in array
		return -1


if __name__ == "__main__":
							print(double_linear_search(list(range(1_00)), 40))
