"""simple docstring"""







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


_a					:					Any=			logging.get_logger(__name__)

_a					:					Dict=			{
    "alibaba-damo/mgp-str-base": "https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json",
}

class 		UpperCamelCase      (   lowercase__						):
				UpperCAmelCase    :				Optional[Any]   =		'''mgp-str'''



				def __init__(self    :				str     ,  _A    :				Any=[32, 1_28]     ,  _A    :				Any=4     ,  _A    :				int=3     ,  _A    :				int=27     ,  _A    :				Union[str, Any]=38     ,  _A    :				List[Any]=5_02_57     ,  _A    :				str=3_05_22     ,  _A    :				Any=7_68     ,  _A    :				Union[str, Any]=12     ,  _A    :				Any=12     ,  _A    :				int=4.0     ,  _A    :				Dict=True     ,  _A    :				Any=False     ,  _A    :				Any=1E-5     ,  _A    :				Optional[Any]=0.0     ,  _A    :				Dict=0.0     ,  _A    :				List[Any]=0.0     ,  _A    :				Optional[int]=False     ,  _A    :				Optional[Any]=0.02     ,  **_A    :				List[str]     ,  )   ->     Union[str, Any]:
					super().__init__(**_a)

					__snake_case      :							List[Any]						=			image_size
					__snake_case      :							List[str]						=			patch_size
					__snake_case      :							str						=			num_channels
					__snake_case      :							Optional[Any]						=			max_token_length
					__snake_case      :							Dict						=			num_character_labels
					__snake_case      :							Union[str, Any]						=			num_bpe_labels
					__snake_case      :							Tuple						=			num_wordpiece_labels
					__snake_case      :							int						=			hidden_size
					__snake_case      :							int						=			num_hidden_layers
					__snake_case      :							Union[str, Any]						=			num_attention_heads
					__snake_case      :							Optional[int]						=			mlp_ratio
					__snake_case      :							List[str]						=			distilled
					__snake_case      :							str						=			layer_norm_eps
					__snake_case      :							int						=			drop_rate
					__snake_case      :							List[Any]						=			qkv_bias
					__snake_case      :							List[Any]						=			attn_drop_rate
					__snake_case      :							Dict						=			drop_path_rate
					__snake_case      :							Union[str, Any]						=			output_aa_attentions
					__snake_case      :							Optional[int]						=			initializer_range






"""simple docstring"""







def   __UpperCAmelCase    (   UpperCAmelCase_   :    list      ,							UpperCAmelCase_   :    int      ,							UpperCAmelCase_   :    int = 0      ,							UpperCAmelCase_   :    int = 0  )							->      int:

	'''simple docstring'''





	__snake_case      :							str						=			right or len(UpperCAmelCase_  ) - 1
	if left > right:
		return -1
	elif list_data[left] == key:
		return left
	elif list_data[right] == key:
		return right
	else:
		return search(UpperCAmelCase_      ,							UpperCAmelCase_      ,							left + 1      ,							right - 1  )


if __name__ == "__main__":
	import doctest

	doctest.testmod()





