




'''simple docstring'''
def  lowerCamelCase(       SCREAMING_SNAKE_CASE_					,SCREAMING_SNAKE_CASE_    )		->		list[tuple[int, int, int]]:
			A_       		=   sorted(SCREAMING_SNAKE_CASE_					,key=lambda SCREAMING_SNAKE_CASE_    : edge[2]    )

			A_       		=   list(range(SCREAMING_SNAKE_CASE_    )    )

			def find_parent(SCREAMING_SNAKE_CASE_    ):
						if i != parent[i]:
									A_       		=   find_parent(parent[i]    )
						return parent[i]

			A_       		=   0
			A_       		=   []

			for edge in edges:
						A_       		=   find_parent(edge[0]    )
						A_       		=   find_parent(edge[1]    )
						if parent_a != parent_b:
									minimum_spanning_tree_cost += edge[2]
									minimum_spanning_tree.append(SCREAMING_SNAKE_CASE_    )
									A_       		=   parent_b

			return minimum_spanning_tree


if __name__ == "__main__":  # pragma: no cover
							_SCREAMING_SNAKE_CASE ,						_SCREAMING_SNAKE_CASE =	list(map(int, input().strip().split()))
							_SCREAMING_SNAKE_CASE =	[]

							for _ in range(num_edges):
														_SCREAMING_SNAKE_CASE ,						_SCREAMING_SNAKE_CASE ,						_SCREAMING_SNAKE_CASE =	(int(x) for x in input().strip().split())
														edges.append((nodea, nodea, cost))

							kruskal(num_nodes, edges)










'''simple docstring'''
from unittest.mock import patch

import datasets
from datasets import Dataset





def  lowerCamelCase(       )		->		Any:
			A_       		=   Dataset.from_dict({'col_1': [3, 2, 0, 1]}    )

			with patch('tqdm.auto.tqdm'    ) as mock_tqdm:
						datasets.disable_progress_bar()
						dset.map(lambda SCREAMING_SNAKE_CASE_    : {"col_2": x["col_1"] + 1}    )
						mock_tqdm.assert_not_called()

						mock_tqdm.reset_mock()

						datasets.enable_progress_bar()
						dset.map(lambda SCREAMING_SNAKE_CASE_    : {"col_2": x["col_1"] + 1}    )
						mock_tqdm.assert_called()




