




'''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_							(_a			:							Union[str, Any]					,     _a			:							Dict  ):
				# ===== initialization =====
				UpperCAmelCase     =	Mock()
				UpperCAmelCase     =	conn, Mock()
				UpperCAmelCase     =	iter([1, None]  )
				UpperCAmelCase     =	lambda _a  : 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()










'''simple docstring'''







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


A									=logging.get_logger(__name__)

A									={
    'alibaba-damo/mgp-str-base': 'https://huggingface.co/alibaba-damo/mgp-str-base/resolve/main/config.json',
}


class     _a						(			__a				):
       __a       :  List[Any]            =      """mgp-str"""
       def __init__(			self		:			str     ,       lowercase		:			str=[32, 128]     ,       lowercase		:			Optional[Any]=4     ,       lowercase		:			Optional[Any]=3     ,       lowercase		:			Dict=27     ,       lowercase		:			Any=38     ,       lowercase		:			int=50_257     ,       lowercase		:			List[str]=30_522     ,       lowercase		:			Optional[int]=768     ,       lowercase		:			List[Any]=12     ,       lowercase		:			Tuple=12     ,       lowercase		:			Optional[int]=4.0     ,       lowercase		:			Union[str, Any]=True     ,       lowercase		:			str=False     ,       lowercase		:			str=1E-5     ,       lowercase		:			Dict=0.0     ,       lowercase		:			Dict=0.0     ,       lowercase		:			Tuple=0.0     ,       lowercase		:			str=False     ,       lowercase		:			Optional[Any]=0.02     ,       **lowercase		:			List[str]     ,       ):



           '''simple docstring'''

           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




