





'''simple docstring'''


def 							UpperCAmelCase_  (						__lowerCamelCase : dict			):
   lowercase_      :set[int]         =			set()
   # To detect a back edge, keep track of vertices currently in the recursion stack
   lowercase_      :set[int]         =			set()
   return any(
       node not in visited and depth_first_search(__lowerCamelCase     ,__lowerCamelCase     ,__lowerCamelCase     ,__lowerCamelCase			)
       for node in graph			)
def 							UpperCAmelCase_  (						__lowerCamelCase : dict     ,__lowerCamelCase : int     ,__lowerCamelCase : set     ,__lowerCamelCase : set			):
   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'''


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowerCAmelCase :					Optional[int] 							={'''configuration_wavlm''': ['''WAVLM_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''WavLMConfig''']}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase :					Optional[Any] 							=[
     '''WAVLM_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''WavLMForAudioFrameClassification''',
     '''WavLMForCTC''',
     '''WavLMForSequenceClassification''',
     '''WavLMForXVector''',
     '''WavLMModel''',
     '''WavLMPreTrainedModel''',
 ]

if TYPE_CHECKING:
 from .configuration_wavlm import WAVLM_PRETRAINED_CONFIG_ARCHIVE_MAP, WavLMConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_wavlm import (
      WAVLM_PRETRAINED_MODEL_ARCHIVE_LIST,
      WavLMForAudioFrameClassification,
      WavLMForCTC,
      WavLMForSequenceClassification,
      WavLMForXVector,
      WavLMModel,
      WavLMPreTrainedModel,
  )

else:
 import sys

 lowerCAmelCase :					Union[str, Any] 							=_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)


