



'''simple docstring'''



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


a__  :	Dict								=	logging.get_logger(__name__)

a__  :	List[Any]								=	{
    'alibaba-damo/mgp-str-base': 'https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json',
}
class 				UpperCAmelCase__     (			__lowerCAmelCase):
 __SCREAMING_SNAKE_CASE    					= '''mgp-str'''



 def __init__(     self						,		lowercase=[3_2, 1_2_8]						,		lowercase=4						,		lowercase=3						,		lowercase=2_7						,		lowercase=3_8						,		lowercase=5_0_2_5_7						,		lowercase=3_0_5_2_2						,		lowercase=7_6_8						,		lowercase=1_2						,		lowercase=1_2						,		lowercase=4.0						,		lowercase=True						,		lowercase=False						,		lowercase=1E-5						,		lowercase=0.0						,		lowercase=0.0						,		lowercase=0.0						,		lowercase=False						,		lowercase=0.02						,		**lowercase						,		)     ->							Optional[int]:
  super().__init__(**lowercase	)

  __UpperCamelCase 					=     image_size
  __UpperCamelCase 					=     patch_size
  __UpperCamelCase 					=     num_channels
  __UpperCamelCase 					=     max_token_length
  __UpperCamelCase 					=     num_character_labels
  __UpperCamelCase 					=     num_bpe_labels
  __UpperCamelCase 					=     num_wordpiece_labels
  __UpperCamelCase 					=     hidden_size
  __UpperCamelCase 					=     num_hidden_layers
  __UpperCamelCase 					=     num_attention_heads
  __UpperCamelCase 					=     mlp_ratio
  __UpperCamelCase 					=     distilled
  __UpperCamelCase 					=     layer_norm_eps
  __UpperCamelCase 					=     drop_rate
  __UpperCamelCase 					=     qkv_bias
  __UpperCamelCase 					=     attn_drop_rate
  __UpperCamelCase 					=     drop_path_rate
  __UpperCamelCase 					=     output_aa_attentions
  __UpperCamelCase 					=     initializer_range






"""simple docstring"""
def 						__a   (	_SCREAMING_SNAKE_CASE		,     _SCREAMING_SNAKE_CASE = False   )	->str:

  if not isinstance(_SCREAMING_SNAKE_CASE		,     _SCREAMING_SNAKE_CASE   ):
    a__:     Optional[int]										=	F'Expected string as input, found {type(_SCREAMING_SNAKE_CASE   )}'
    raise ValueError(_SCREAMING_SNAKE_CASE   )
  if not isinstance(_SCREAMING_SNAKE_CASE		,     _SCREAMING_SNAKE_CASE   ):
    a__:     List[str]										=	F'Expected boolean as use_pascal parameter, found {type(_SCREAMING_SNAKE_CASE   )}'
    raise ValueError(_SCREAMING_SNAKE_CASE   )

  a__:     int										=	input_str.split('_'   )

  a__:     List[str]										=	0 if use_pascal else 1

  a__:     List[str]										=	words[start_index:]

  a__:     List[str]										=	[word[0].upper() + word[1:] for word in words_to_capitalize]

  a__:     List[str]										=	'' if use_pascal else words[0]

  return "".join([initial_word, *capitalized_words]   )


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

 testmod()


