


"""simple docstring"""


import math
from collections.abc import Callable







def  __snake_case       (   UpperCamelCase__ ,			UpperCamelCase__ ,			UpperCamelCase__	)      ->		float:







		"""simple docstring"""





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







def  __snake_case       (   UpperCamelCase__	)      ->		float:







		"""simple docstring"""





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


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









"""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()





