





def 				SCREAMING_SNAKE_CASE__							(       UpperCamelCase__:							Tuple					,   UpperCamelCase__:							Tuple    ):
		return (pointa[0] - pointa[0]) ** 2 + (pointa[1] - pointa[1]) ** 2






def 				SCREAMING_SNAKE_CASE__							(       UpperCamelCase__:							str					,   UpperCamelCase__:							Any=0    ):
		return sorted(UpperCamelCase__					,   key=lambda UpperCamelCase__    : x[column]    )






def 				SCREAMING_SNAKE_CASE__							(       UpperCamelCase__:							Union[str, Any]					,   UpperCamelCase__:							Dict					,   UpperCamelCase__:							Tuple=float("""inf"""    )    ):

		for i in range(points_counts - 1    ):
				for j in range(i + 1					,   UpperCamelCase__    ):
						SCREAMING_SNAKE_CASE__			=      euclidean_distance_sqr(points[i]					,   points[j]    )
						if current_dis < min_dis:
								SCREAMING_SNAKE_CASE__			=      current_dis
		return min_dis






def 				SCREAMING_SNAKE_CASE__							(       UpperCamelCase__:							Optional[Any]					,   UpperCamelCase__:							Optional[int]					,   UpperCamelCase__:							int=float("""inf"""    )    ):

		for i in range(min(6					,   points_counts - 1    )					,   UpperCamelCase__    ):
				for j in range(max(0					,   i - 6    )					,   UpperCamelCase__    ):
						SCREAMING_SNAKE_CASE__			=      euclidean_distance_sqr(points[i]					,   points[j]    )
						if current_dis < min_dis:
								SCREAMING_SNAKE_CASE__			=      current_dis
		return min_dis






def 				SCREAMING_SNAKE_CASE__							(       UpperCamelCase__:							List[str]					,   UpperCamelCase__:							int					,   UpperCamelCase__:							Any    ):

		# base case
		if points_counts <= 3:
				return dis_between_closest_pair(UpperCamelCase__					,   UpperCamelCase__    )

		# recursion
		SCREAMING_SNAKE_CASE__			=      points_counts // 2
		SCREAMING_SNAKE_CASE__			=      closest_pair_of_points_sqr(
		    UpperCamelCase__					,   points_sorted_on_y[:mid]					,   UpperCamelCase__    )
		SCREAMING_SNAKE_CASE__			=      closest_pair_of_points_sqr(
		    UpperCamelCase__					,   points_sorted_on_y[mid:]					,   points_counts - mid    )
		SCREAMING_SNAKE_CASE__			=      min(UpperCamelCase__					,   UpperCamelCase__    )
		SCREAMING_SNAKE_CASE__			=      []
		for point in points_sorted_on_x:
				if abs(point[0] - points_sorted_on_x[mid][0]    ) < closest_pair_dis:
						cross_strip.append(UpperCamelCase__    )

		SCREAMING_SNAKE_CASE__			=      dis_between_closest_in_strip(
		    UpperCamelCase__					,   len(UpperCamelCase__    )					,   UpperCamelCase__    )
		return min(UpperCamelCase__					,   UpperCamelCase__    )






def 				SCREAMING_SNAKE_CASE__							(       UpperCamelCase__:							Optional[Any]					,   UpperCamelCase__:							Tuple    ):
		SCREAMING_SNAKE_CASE__			=      column_based_sort(UpperCamelCase__					,   column=0    )
		SCREAMING_SNAKE_CASE__			=      column_based_sort(UpperCamelCase__					,   column=1    )
		return (
		    closest_pair_of_points_sqr(
		        UpperCamelCase__					,   UpperCamelCase__					,   UpperCamelCase__    )
		) ** 0.5


if __name__ == "__main__":
	_lowerCamelCase   				=			[(2, 3), (12, 30), (40, 50), (5, 1), (12, 10), (3, 4)]
	print('Distance:', closest_pair_of_points(points, len(points)))






import inspect
import unittest




class   UpperCamelCase_       (     unittest.TestCase    ):


							def      _snake_case  (							self    :str		)   ->   Union[str, Any]:



									"""simple docstring"""



									try:
											import diffusers  # noqa: F401
									except ImportError:
											assert False


							def      _snake_case  (							self    :Any		)   ->   Any:



									"""simple docstring"""



									import diffusers
									from diffusers.dependency_versions_table import deps

									SCREAMING_SNAKE_CASE__			=      inspect.getmembers(__A							,				inspect.isclass		)

									for cls_name, cls_module in all_classes:
											if "dummy_" in cls_module.__module__:
													for backend in cls_module._backends:
															if backend == "k_diffusion":
																	SCREAMING_SNAKE_CASE__			=      """k-diffusion"""
															elif backend == "invisible_watermark":
																	SCREAMING_SNAKE_CASE__			=      """invisible-watermark"""
															assert backend in deps, f'''{backend} is not in the deps table!'''