


import warnings

from ...utils import logging
from .image_processing_levit import LevitImageProcessor


_A							     =       logging.get_logger(__name__)

class 			lowerCamelCase_					(    _SCREAMING_SNAKE_CASE    ):





							def __init__(							self			,       *_SCREAMING_SNAKE_CASE			,       **_SCREAMING_SNAKE_CASE    ):
								warnings.warn(
								    """The class LevitFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please"""
								    """ use LevitImageProcessor instead."""			,       _SCREAMING_SNAKE_CASE			,       )
								super().__init__(*_SCREAMING_SNAKE_CASE			,       **_SCREAMING_SNAKE_CASE    )



def 			__SCREAMING_SNAKE_CASE		(		UpperCamelCase		:      int     ,					UpperCamelCase		:      list[tuple[int, int, int]]	)     ->	list[tuple[int, int, int]]:



	"""simple docstring"""






	a_     			=   sorted(UpperCamelCase     ,					key=lambda UpperCamelCase	: edge[2]	)

	a_     			=   list(range(UpperCamelCase	)	)

	def find_parent(UpperCamelCase		:      Any	):
		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(UpperCamelCase	)
			a_     			=   parent_b

	return minimum_spanning_tree


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

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

			kruskal(num_nodes, edges)