




from unittest.mock import Mock, patch

from file_transfer.send_file import send_file







@patch("""socket.socket"""     )
@patch("""builtins.open"""     )
def 				lowerCAmelCase_	(     snake_case_,snake_case_     ):
      # ===== initialization =====
      _A							:     List[str]			=						Mock()
      _A							:     Optional[int]			=						conn, Mock()
      _A							:     Union[str, Any]			=						iter([1, None]     )
      _A							:     List[str]			=						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()







'''simple docstring'''

import math
from collections.abc import Callable


def 		__magic_name__    (	__UpperCAmelCase,      __UpperCAmelCase,      __UpperCAmelCase	)		->					float:

					'''simple docstring'''

					snake_case_									=				xa
					snake_case_									=				xa
					while True:
										if x_n == x_na or function(__UpperCAmelCase	) == function(__UpperCAmelCase	):
															raise ZeroDivisionError('''float division by zero, could not find root'''	)
										snake_case_									=				x_na - (
										    function(__UpperCAmelCase	) / ((function(__UpperCAmelCase	) - function(__UpperCAmelCase	)) / (x_na - x_n))
										)
										if abs(x_na - x_na	) < 10**-5:
															return x_na
										snake_case_									=				x_na
										snake_case_									=				x_na


def 		__magic_name__    (	__UpperCAmelCase	)		->					float:

					'''simple docstring'''

					return math.pow(__UpperCAmelCase,      3	) - (2 * x) - 5


if __name__ == "__main__":
							print(intersection(f, 3, 3.5))

