



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


__snake_case						:Union[str, Any]      		=     logging.get_logger(__name__)

__snake_case						:Optional[int]      		=     {
    '''Visual-Attention-Network/van-base''': (
        '''https://huggingface.co/Visual-Attention-Network/van-base/blob/main/config.json'''
    ),
}

class     _A       (	__UpperCAmelCase    ):
       UpperCamelCase__  :    Optional[int]											=						'''van'''



       def __init__(		self							:     Optional[int]     ,		__SCREAMING_SNAKE_CASE							:     Union[str, Any]=224     ,		__SCREAMING_SNAKE_CASE							:     List[str]=3     ,		__SCREAMING_SNAKE_CASE							:     Any=[7, 3, 3, 3]     ,		__SCREAMING_SNAKE_CASE							:     Optional[Any]=[4, 2, 2, 2]     ,		__SCREAMING_SNAKE_CASE							:     Tuple=[64, 128, 320, 512]     ,		__SCREAMING_SNAKE_CASE							:     Optional[Any]=[3, 3, 12, 3]     ,		__SCREAMING_SNAKE_CASE							:     Dict=[8, 8, 4, 4]     ,		__SCREAMING_SNAKE_CASE							:     Any="gelu"     ,		__SCREAMING_SNAKE_CASE							:     Dict=0.02     ,		__SCREAMING_SNAKE_CASE							:     List[Any]=1E-6     ,		__SCREAMING_SNAKE_CASE							:     Optional[Any]=1E-2     ,		__SCREAMING_SNAKE_CASE							:     Optional[int]=0.0     ,		__SCREAMING_SNAKE_CASE							:     Optional[Any]=0.0     ,		**__SCREAMING_SNAKE_CASE							:     Any     ,		):


           '''simple docstring'''

           super().__init__(**__SCREAMING_SNAKE_CASE)
           __a						       =				image_size
           __a						       =				num_channels
           __a						       =				patch_sizes
           __a						       =				strides
           __a						       =				hidden_sizes
           __a						       =				depths
           __a						       =				mlp_ratios
           __a						       =				hidden_act
           __a						       =				initializer_range
           __a						       =				layer_norm_eps
           __a						       =				layer_scale_init_value
           __a						       =				drop_path_rate
           __a						       =				dropout_rate












"""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		(	_lowercase						:    List[Any]    ,       _lowercase						:    int					) ->str:






	'''simple docstring'''






	a      :		Optional[Any]	=				Mock()
	a      :		Dict	=				conn, Mock()
	a      :		Union[str, Any]	=				iter([1, None]					)
	a      :		Optional[int]	=				lambda _lowercase					: next(_lowercase					)

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

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


