



from collections import namedtuple

UpperCamelCase__ =						namedtuple("from_to", "from_ to")

UpperCamelCase__ =						{
    "cubicmeter": from_to(1, 1),
    "litre": from_to(0.001, 10_00),
    "kilolitre": from_to(1, 1),
    "gallon": from_to(0.00_454, 264.172),
    "cubicyard": from_to(0.76_455, 1.30_795),
    "cubicfoot": from_to(0.028, 35.3_147),
    "cup": from_to(0.000_236_588, 4_226.75),
}






def  UpperCAmelCase__    (    lowercase__						,       lowercase__						,       lowercase__   ) ->      float:
						if from_type not in METRIC_CONVERSION:
												raise ValueError(
												    F"Invalid 'from_type' value: {from_type!r}  Supported values are:\n"
												    + """, """.join(lowercase__   )   )
						if to_type not in METRIC_CONVERSION:
												raise ValueError(
												    F"Invalid 'to_type' value: {to_type!r}.  Supported values are:\n"
												    + """, """.join(lowercase__   )   )
						return value * METRIC_CONVERSION[from_type].from_ * METRIC_CONVERSION[to_type].to


if __name__ == "__main__":
			import doctest

			doctest.testmod()










import random






def  UpperCAmelCase__    (    lowercase__						,       lowercase__						,       lowercase__ = False   ) ->      dict:
						__lowercase					=				{i: [] for i in range(lowercase__   )}

						# if probability is greater or equal than 1, then generate a complete graph
						if probability >= 1:
												return complete_graph(lowercase__   )
						# 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(lowercase__   ):
												for j in range(i + 1						,       lowercase__   ):
																		if random.random() < probability:
																								graph[i].append(lowercase__   )
																								if not directed:
																														# if the graph is undirected, add an edge in from j to i, either
																														graph[j].append(lowercase__   )
						return graph






def  UpperCAmelCase__    (    lowercase__   ) ->      dict:
						return {
						    i: [j for j in range(lowercase__   ) if i != j] for i in range(lowercase__   )
						}


if __name__ == "__main__":
			import doctest

			doctest.testmod()





