




'''simple docstring'''


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


lowerCAmelCase_      :  Tuple				     =  logging.get_logger(__name__)

lowerCAmelCase_      :  Optional[Any]				     =  {
    'weiweishi/roc-bert-base-zh': 'https://huggingface.co/weiweishi/roc-bert-base-zh/resolve/main/config.json',
}







class      SCREAMING_SNAKE_CASE    (						snake_case_				):
      __magic_name__  :       Any   							=					'''roc_bert'''






      def __init__( self   :  Dict						,						lowercase__   :  Tuple=3_0522						,						lowercase__   :  Dict=768						,						lowercase__   :  List[str]=12						,						lowercase__   :  List[Any]=12						,						lowercase__   :  Any=3072						,						lowercase__   :  Dict="gelu"						,						lowercase__   :  Dict=0.1						,						lowercase__   :  Union[str, Any]=0.1						,						lowercase__   :  List[str]=512						,						lowercase__   :  Optional[Any]=2						,						lowercase__   :  Dict=0.02						,						lowercase__   :  List[str]=1e-1_2						,						lowercase__   :  List[Any]=True						,						lowercase__   :  List[str]=0						,						lowercase__   :  int="absolute"						,						lowercase__   :  str=None						,						lowercase__   :  Optional[int]=True						,						lowercase__   :  Any=True						,						lowercase__   :  Optional[Any]=768						,						lowercase__   :  Any=910						,						lowercase__   :  List[str]=512						,						lowercase__   :  Tuple=2_4858						,						lowercase__   :  str=True						,						**lowercase__   :  List[Any]						,						):


           '''simple docstring'''

           a_     :							Optional[Any]     						=  vocab_size
           a_     :							Union[str, Any]     						=  max_position_embeddings
           a_     :							Tuple     						=  hidden_size
           a_     :							str     						=  num_hidden_layers
           a_     :							Tuple     						=  num_attention_heads
           a_     :							Tuple     						=  intermediate_size
           a_     :							List[Any]     						=  hidden_act
           a_     :							List[str]     						=  hidden_dropout_prob
           a_     :							Tuple     						=  attention_probs_dropout_prob
           a_     :							List[Any]     						=  initializer_range
           a_     :							int     						=  type_vocab_size
           a_     :							Optional[Any]     						=  layer_norm_eps
           a_     :							Any     						=  use_cache
           a_     :							Tuple     						=  enable_pronunciation
           a_     :							Any     						=  enable_shape
           a_     :							Optional[int]     						=  pronunciation_embed_dim
           a_     :							Tuple     						=  pronunciation_vocab_size
           a_     :							Dict     						=  shape_embed_dim
           a_     :							Dict     						=  shape_vocab_size
           a_     :							Dict     						=  concat_input
           a_     :							Union[str, Any]     						=  position_embedding_type
           a_     :							Union[str, Any]     						=  classifier_dropout
           super().__init__(pad_token_id=lowercase__						,						**lowercase__       )






'''simple docstring'''


from unittest.mock import Mock, patch

from file_transfer.send_file import send_file



@patch("""socket.socket"""				)
@patch("""builtins.open"""				)
def  _SCREAMING_SNAKE_CASE     (      UpperCamelCase__    :					Dict ,    UpperCamelCase__    :					Tuple				):




     """simple docstring"""


     a_     :							Dict     						=  Mock()
     a_     :							List[str]     						=  conn, Mock()
     a_     :							Optional[int]     						=  iter([1, None]				)
     a_     :							List[str]     						=  lambda UpperCamelCase__				: next(UpperCamelCase__				)

     # ===== invoke =====
     send_file(filename="""mytext.txt""" ,    testing=UpperCamelCase__				)

     # ===== ensurance =====
     sock.assert_called_once()
     sock.return_value.bind.assert_called_once()
     sock.return_value.listen.assert_called_once()
     sock.return_value.accept.assert_called_once()
     conn.recv.assert_called_once()

     file.return_value.__enter__.assert_called_once()
     file.return_value.__enter__.return_value.read.assert_called()

     conn.send.assert_called_once()
     conn.close.assert_called_once()
     sock.return_value.shutdown.assert_called_once()
     sock.return_value.close.assert_called_once()
