


"""simple docstring"""


from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


UpperCamelCase						:				List[str]             =      {
    "susnato/ernie-m-base_pytorch": "https://huggingface.co/susnato/ernie-m-base_pytorch/blob/main/config.json",
    "susnato/ernie-m-large_pytorch": "https://huggingface.co/susnato/ernie-m-large_pytorch/blob/main/config.json",
}



class 			lowerCamelCase__						(   UpperCAmelCase_			):
						lowerCAmelCase       =     """ernie_m"""
						lowerCAmelCase       =     {"dropout": "classifier_dropout", "num_classes": "num_labels"}







						def __init__(							self   :    Any			,			_lowercase   :    int = 250_002			,			_lowercase   :    int = 768			,			_lowercase   :    int = 12			,			_lowercase   :    int = 12			,			_lowercase   :    int = 3_072			,			_lowercase   :    str = "gelu"			,			_lowercase   :    float = 0.1			,			_lowercase   :    float = 0.1			,			_lowercase   :    int = 514			,			_lowercase   :    float = 0.0_2			,			_lowercase   :    int = 1			,			_lowercase   :    float = 1e-05			,			_lowercase   :    int=None			,			_lowercase   :    List[Any]=False			,			_lowercase   :    List[Any]=0.0			,			**_lowercase   :    Optional[Any]			,			):
								super().__init__(pad_token_id=_lowercase			,			**_lowercase		)
								A					       = vocab_size
								A					       = hidden_size
								A					       = num_hidden_layers
								A					       = num_attention_heads
								A					       = intermediate_size
								A					       = hidden_act
								A					       = hidden_dropout_prob
								A					       = attention_probs_dropout_prob
								A					       = max_position_embeddings
								A					       = initializer_range
								A					       = layer_norm_eps
								A					       = classifier_dropout
								A					       = is_decoder
								A					       = act_dropout









"""simple docstring"""


from unittest.mock import Mock, patch

from file_transfer.send_file import send_file







@patch('socket.socket'	)
@patch('builtins.open'	)
def  __snake_case       (   UpperCamelCase__ ,			UpperCamelCase__	)      ->		Dict:







		"""simple docstring"""





		A					       = Mock()
		A					       = conn, Mock()
		A					       = iter([1, None]	)
		A					       = 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()





