
'''simple docstring'''







def 					snake_case_		(				__SCREAMING_SNAKE_CASE					: Optional[int]							):



						"""simple docstring"""





						lowercase_	:     List[str]													=       [0] * len(__SCREAMING_SNAKE_CASE							)
						lowercase_	:     Union[str, Any]													=       []
						lowercase_	:     int													=       []
						lowercase_	:     Optional[int]													=       0

						for values in graph.values():
												for i in values:
																		indegree[i] += 1

						for i in range(len(__SCREAMING_SNAKE_CASE							)							):
												if indegree[i] == 0:
																		queue.append(__SCREAMING_SNAKE_CASE							)

						while queue:
												lowercase_	:     List[str]													=       queue.pop(0							)
												cnt += 1
												topo.append(__SCREAMING_SNAKE_CASE							)
												for x in graph[vertex]:
																		indegree[x] -= 1
																		if indegree[x] == 0:
																								queue.append(__SCREAMING_SNAKE_CASE							)

						if cnt != len(__SCREAMING_SNAKE_CASE							):
												print('''Cycle exists'''							)
						else:
												print(__SCREAMING_SNAKE_CASE							)


# Adjacency List of Graph
_lowercase :  Dict    							=       {0: [1, 2], 1: [3], 2: [3], 3: [4, 5], 4: [], 5: []}




topological_sort(graph)










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


