





import random





def     _UpperCamelCase     (a__   :int   ,			a__   :float   ,			a__   :bool = False       ):






							"""simple docstring"""





							UpperCamelCase__				     =			{i: [] for i in range(a__       )}

							# if probability is greater or equal than 1, then generate a complete graph
							if probability >= 1:
														return complete_graph(a__       )
							# if probability is lower or equal than 0, then return a graph without edges
							if probability <= 0:
														return graph

							# for each couple of nodes, add an edge from u to v
							# if the number randomly generated is greater than probability probability
							for i in range(a__       ):
														for j in range(i + 1   ,			a__       ):
																					if random.random() < probability:
																												graph[i].append(a__       )
																												if not directed:
																																			# if the graph is undirected, add an edge in from j to i, either
																																			graph[j].append(a__       )
							return graph





def     _UpperCamelCase     (a__   :int       ):






							"""simple docstring"""





							return {
							    i: [j for j in range(a__       ) if i != j] for i in range(a__       )
							}


if __name__ == "__main__":
					import doctest

					doctest.testmod()









import inspect
import unittest

class        __SCREAMING_SNAKE_CASE					(     unittest.TestCase       ):






							def 				_lowerCamelCase		(						self  ):
														try:
																					import diffusers  # noqa: F401
														except ImportError:
																					assert False







							def 				_lowerCamelCase		(						self  ):
														import diffusers
														from diffusers.dependency_versions_table import deps

														UpperCamelCase__				     =			inspect.getmembers(__lowerCAmelCase  , 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":
																																										UpperCamelCase__				     =			"""k-diffusion"""
																																			elif backend == "invisible_watermark":
																																										UpperCamelCase__				     =			"""invisible-watermark"""
																																			assert backend in deps, f"""{backend} is not in the deps table!"""




