

"""simple docstring"""
def 					a__						(						lowerCAmelCase    )	-> bool:
      UpperCAmelCase__			:							set[int]							=    set()
      # To detect a back edge, keep track of vertices currently in the recursion stack
      UpperCAmelCase__			:							set[int]							=    set()
      return any(
          node not in visited and depth_first_search(lowerCAmelCase			,	lowerCAmelCase			,	lowerCAmelCase			,	lowerCAmelCase    )
          for node in graph    )




def 					a__						(						lowerCAmelCase			,	lowerCAmelCase			,	lowerCAmelCase			,	lowerCAmelCase    )	-> bool:
      visited.add(lowerCAmelCase    )
      rec_stk.add(lowerCAmelCase    )

      for node in graph[vertex]:
            if node not in visited:
                  if depth_first_search(lowerCAmelCase			,	lowerCAmelCase			,	lowerCAmelCase			,	lowerCAmelCase    ):
                        return True
            elif node in rec_stk:
                  return True

    # The node needs to be removed from recursion stack before function ends
      rec_stk.remove(lowerCAmelCase    )
      return False


if __name__ == "__main__":
    from doctest import testmod

    testmod()




"""simple docstring"""
import cmath
import math




def 					a__						(						lowerCAmelCase			,	lowerCAmelCase			,	lowerCAmelCase			,	lowerCAmelCase    )	-> complex:
      UpperCAmelCase__			:							str							=    math.radians(lowerCAmelCase    )
      UpperCAmelCase__			:							Optional[int]							=    math.radians(lowerCAmelCase    )

      # Convert voltage and current to rectangular form
      UpperCAmelCase__			:							Union[str, Any]							=    cmath.rect(lowerCAmelCase			,	lowerCAmelCase    )
      UpperCAmelCase__			:							List[str]							=    cmath.rect(lowerCAmelCase			,	lowerCAmelCase    )

      # Calculate apparent power
      return voltage_rect * current_rect


if __name__ == "__main__":
    import doctest

    doctest.testmod()

