


from unittest.mock import Mock, patch

from file_transfer.send_file import send_file




@patch("""socket.socket"""     )
@patch("""builtins.open"""     )
def    a__    (		snake_case__					:							str						,   snake_case__					:							str     ):
  # ===== initialization =====
  _UpperCAmelCase		:							List[str]							=     Mock()
  _UpperCAmelCase		:							Optional[Any]							=     conn, Mock()
  _UpperCAmelCase		:							List[Any]							=     iter([1, None]     )
  _UpperCAmelCase		:							Any							=     lambda snake_case__     : next(snake_case__     )

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

  # ===== 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()









from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


SCREAMING_SNAKE_CASE__					:     List[Any]       =     {
    '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 		_SCREAMING_SNAKE_CASE     (						A     ):
     __SCREAMING_SNAKE_CASE     					=    '''ernie_m'''
     __SCREAMING_SNAKE_CASE     					=    {"dropout": "classifier_dropout", "num_classes": "num_labels"}


     def __init__(  self							,					A_ = 25_00_02							,					A_ = 7_68							,					A_ = 12							,					A_ = 12							,					A_ = 30_72							,					A_ = "gelu"							,					A_ = 0.1							,					A_ = 0.1							,					A_ = 5_14							,					A_ = 0.0_2							,					A_ = 1							,					A_ = 1e-05							,					A_=None							,					A_=False							,					A_=0.0							,					**A_							,					):
       super().__init__(pad_token_id=A_							,					**A_    )
       _UpperCAmelCase		:							Tuple							=     vocab_size
       _UpperCAmelCase		:							List[str]							=     hidden_size
       _UpperCAmelCase		:							Optional[int]							=     num_hidden_layers
       _UpperCAmelCase		:							Tuple							=     num_attention_heads
       _UpperCAmelCase		:							Dict							=     intermediate_size
       _UpperCAmelCase		:							List[Any]							=     hidden_act
       _UpperCAmelCase		:							Any							=     hidden_dropout_prob
       _UpperCAmelCase		:							Any							=     attention_probs_dropout_prob
       _UpperCAmelCase		:							Tuple							=     max_position_embeddings
       _UpperCAmelCase		:							Dict							=     initializer_range
       _UpperCAmelCase		:							Optional[Any]							=     layer_norm_eps
       _UpperCAmelCase		:							str							=     classifier_dropout
       _UpperCAmelCase		:							Any							=     is_decoder
       _UpperCAmelCase		:							Union[str, Any]							=     act_dropout





