'''simple docstring'''





from __future__ import annotations

from math import pow, sqrt





def 	lowerCAmelCase_				(					snake_case_       : Any					,    snake_case_       : Union[str, Any]					,    snake_case_       : Optional[int]			)    ->      dict[str, float]:


     '''simple docstring'''




     if (resistance, reactance, impedance).count(0			) != 1:
          raise ValueError("One and only one argument must be 0"			)
     if resistance == 0:
          return {"resistance": sqrt(pow(lowerCAmelCase_					,    2			) - pow(lowerCAmelCase_					,    2			)			)}
     elif reactance == 0:
          return {"reactance": sqrt(pow(lowerCAmelCase_					,    2			) - pow(lowerCAmelCase_					,    2			)			)}
     elif impedance == 0:
          return {"impedance": sqrt(pow(lowerCAmelCase_					,    2			) + pow(lowerCAmelCase_					,    2			)			)}
     else:
          raise ValueError("Exactly one argument must be 0"			)


if __name__ == "__main__":
    import doctest

    doctest.testmod()








import inspect
import unittest







class  snake_case__(							unittest.TestCase							):







						'''simple docstring'''




						def   lowercase_       ( self							)    ->			int:
										try:
														import diffusers  # noqa: F401
										except ImportError:
														assert False




						def   lowercase_       ( self							)    ->			List[str]:
										import diffusers
										from diffusers.dependency_versions_table import deps

										lowerCAmelCase_       :					Any			 = inspect.getmembers(__lowercase      ,  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":
																										lowerCAmelCase_       :					Optional[int]			 = '''k-diffusion'''
																						elif backend == "invisible_watermark":
																										lowerCAmelCase_       :					Dict			 = '''invisible-watermark'''
																						assert backend in deps, f"""{backend} is not in the deps table!"""