"""simple docstring"""





from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


lowerCAmelCase_     =	logging.get_logger(__name__)

lowerCAmelCase_     =	{
    '''bert-base-uncased''': '''https://huggingface.co/bert-base-uncased/resolve/main/config.json''',
    '''bert-large-uncased''': '''https://huggingface.co/bert-large-uncased/resolve/main/config.json''',
    '''bert-base-cased''': '''https://huggingface.co/bert-base-cased/resolve/main/config.json''',
    '''bert-large-cased''': '''https://huggingface.co/bert-large-cased/resolve/main/config.json''',
    '''bert-base-multilingual-uncased''': '''https://huggingface.co/bert-base-multilingual-uncased/resolve/main/config.json''',
    '''bert-base-multilingual-cased''': '''https://huggingface.co/bert-base-multilingual-cased/resolve/main/config.json''',
    '''bert-base-chinese''': '''https://huggingface.co/bert-base-chinese/resolve/main/config.json''',
    '''bert-base-german-cased''': '''https://huggingface.co/bert-base-german-cased/resolve/main/config.json''',
    '''bert-large-uncased-whole-word-masking''': (
        '''https://huggingface.co/bert-large-uncased-whole-word-masking/resolve/main/config.json'''
    ),
    '''bert-large-cased-whole-word-masking''': (
        '''https://huggingface.co/bert-large-cased-whole-word-masking/resolve/main/config.json'''
    ),
    '''bert-large-uncased-whole-word-masking-finetuned-squad''': (
        '''https://huggingface.co/bert-large-uncased-whole-word-masking-finetuned-squad/resolve/main/config.json'''
    ),
    '''bert-large-cased-whole-word-masking-finetuned-squad''': (
        '''https://huggingface.co/bert-large-cased-whole-word-masking-finetuned-squad/resolve/main/config.json'''
    ),
    '''bert-base-cased-finetuned-mrpc''': '''https://huggingface.co/bert-base-cased-finetuned-mrpc/resolve/main/config.json''',
    '''bert-base-german-dbmdz-cased''': '''https://huggingface.co/bert-base-german-dbmdz-cased/resolve/main/config.json''',
    '''bert-base-german-dbmdz-uncased''': '''https://huggingface.co/bert-base-german-dbmdz-uncased/resolve/main/config.json''',
    '''cl-tohoku/bert-base-japanese''': '''https://huggingface.co/cl-tohoku/bert-base-japanese/resolve/main/config.json''',
    '''cl-tohoku/bert-base-japanese-whole-word-masking''': (
        '''https://huggingface.co/cl-tohoku/bert-base-japanese-whole-word-masking/resolve/main/config.json'''
    ),
    '''cl-tohoku/bert-base-japanese-char''': (
        '''https://huggingface.co/cl-tohoku/bert-base-japanese-char/resolve/main/config.json'''
    ),
    '''cl-tohoku/bert-base-japanese-char-whole-word-masking''': (
        '''https://huggingface.co/cl-tohoku/bert-base-japanese-char-whole-word-masking/resolve/main/config.json'''
    ),
    '''TurkuNLP/bert-base-finnish-cased-v1''': (
        '''https://huggingface.co/TurkuNLP/bert-base-finnish-cased-v1/resolve/main/config.json'''
    ),
    '''TurkuNLP/bert-base-finnish-uncased-v1''': (
        '''https://huggingface.co/TurkuNLP/bert-base-finnish-uncased-v1/resolve/main/config.json'''
    ),
    '''wietsedv/bert-base-dutch-cased''': '''https://huggingface.co/wietsedv/bert-base-dutch-cased/resolve/main/config.json''',
    # See all BERT models at https://huggingface.co/models?filter=bert
}




class  _snake_case		(    __lowerCamelCase ):







				"""simple docstring"""






				a			=						'bert'





				def __init__(      self							:							List[str]      ,    _A							:							str=3_0_5_2_2      ,    _A							:							Optional[int]=7_6_8      ,    _A							:							Tuple=1_2      ,    _A							:							int=1_2      ,    _A							:							int=3_0_7_2      ,    _A							:							Optional[int]="gelu"      ,    _A							:							Optional[Any]=0.1      ,    _A							:							List[Any]=0.1      ,    _A							:							Optional[int]=5_1_2      ,    _A							:							List[Any]=2      ,    _A							:							int=0.02      ,    _A							:							List[str]=1e-12      ,    _A							:							Dict=0      ,    _A							:							List[Any]="absolute"      ,    _A							:							Tuple=True      ,    _A							:							Tuple=None      ,    **_A							:							Optional[Any]      ,    ):



											"""simple docstring"""







											super().__init__(pad_token_id=UpperCamelCase_      ,    **UpperCamelCase_)

											_SCREAMING_SNAKE_CASE			  =    vocab_size
											_SCREAMING_SNAKE_CASE			  =    hidden_size
											_SCREAMING_SNAKE_CASE			  =    num_hidden_layers
											_SCREAMING_SNAKE_CASE			  =    num_attention_heads
											_SCREAMING_SNAKE_CASE			  =    hidden_act
											_SCREAMING_SNAKE_CASE			  =    intermediate_size
											_SCREAMING_SNAKE_CASE			  =    hidden_dropout_prob
											_SCREAMING_SNAKE_CASE			  =    attention_probs_dropout_prob
											_SCREAMING_SNAKE_CASE			  =    max_position_embeddings
											_SCREAMING_SNAKE_CASE			  =    type_vocab_size
											_SCREAMING_SNAKE_CASE			  =    initializer_range
											_SCREAMING_SNAKE_CASE			  =    layer_norm_eps
											_SCREAMING_SNAKE_CASE			  =    position_embedding_type
											_SCREAMING_SNAKE_CASE			  =    use_cache
											_SCREAMING_SNAKE_CASE			  =    classifier_dropout




class  _snake_case		(    __lowerCamelCase ):







				"""simple docstring"""






				@property
				def 		_lowerCAmelCase		(      self							:							Any):



											"""simple docstring"""







											if self.task == "multiple-choice":
																		_SCREAMING_SNAKE_CASE			  =    {0: """batch""", 1: """choice""", 2: """sequence"""}
											else:
																		_SCREAMING_SNAKE_CASE			  =    {0: """batch""", 1: """sequence"""}
											return OrderedDict(
											    [
											        ("""input_ids""", dynamic_axis),
											        ("""attention_mask""", dynamic_axis),
											        ("""token_type_ids""", dynamic_axis),
											    ])



"""simple docstring"""





from __future__ import annotations



def      lowerCamelCase_(__SCREAMING_SNAKE_CASE     ,	__SCREAMING_SNAKE_CASE     ,	__SCREAMING_SNAKE_CASE     ,	)->    tuple:
							if (electron_conc, hole_conc, intrinsic_conc).count(0  ) != 1:
														raise ValueError("""You cannot supply more or less than 2 values"""  )
							elif electron_conc < 0:
														raise ValueError("""Electron concentration cannot be negative in a semiconductor"""  )
							elif hole_conc < 0:
														raise ValueError("""Hole concentration cannot be negative in a semiconductor"""  )
							elif intrinsic_conc < 0:
														raise ValueError(
														    """Intrinsic concentration cannot be negative in a semiconductor"""  )
							elif electron_conc == 0:
														return (
														    "electron_conc",
														    intrinsic_conc**2 / hole_conc,
														)
							elif hole_conc == 0:
														return (
														    "hole_conc",
														    intrinsic_conc**2 / electron_conc,
														)
							elif intrinsic_conc == 0:
														return (
														    "intrinsic_conc",
														    (electron_conc * hole_conc) ** 0.5,
														)
							else:
														return (-1, -1)


if __name__ == "__main__":
			import doctest

			doctest.testmod()


