





"""simple docstring"""
def 					__lowerCamelCase       (							a_					:		Any							)      ->				List[str]:
      return [
          {
              0: [1, 2],
              1: [0, 2],
              2: [0, 1, 3, 5],
              3: [2, 4],
              4: [3],
              5: [2, 6, 8],
              6: [5, 7],
              7: [6, 8],
              8: [5, 7],
          },
          {
              0: [6],
              1: [9],
              2: [4, 5],
              3: [4],
              4: [2, 3],
              5: [2],
              6: [0, 7],
              7: [6],
              8: [],
              9: [1],
          },
          {
              0: [4],
              1: [6],
              2: [],
              3: [5, 6, 7],
              4: [0, 6],
              5: [3, 8, 9],
              6: [1, 3, 4, 7],
              7: [3, 6, 8, 9],
              8: [5, 7],
              9: [5, 7],
          },
          {
              0: [1, 3],
              1: [0, 2, 4],
              2: [1, 3, 4],
              3: [0, 2, 4],
              4: [1, 2, 3],
          },
      ][index]



def 					__lowerCamelCase       (							a_					:		dict[int, list[int]]							)      ->				list[tuple[int, int]]:
      __SCREAMING_SNAKE_CASE       :int		    =  0
      __SCREAMING_SNAKE_CASE       :Union[str, Any]		    =  len(a_							)  # No of vertices in graph
      __SCREAMING_SNAKE_CASE       :Union[str, Any]		    =  [0] * n
      __SCREAMING_SNAKE_CASE       :str		    =  [False] * n

      def dfs(a_					:		Any			,       a_					:		Any			,       a_					:		Union[str, Any]			,       a_					:		Dict							):
            __SCREAMING_SNAKE_CASE       :List[Any]		    =  True
            __SCREAMING_SNAKE_CASE       :List[Any]		    =  id_
            id_ += 1
            for to in graph[at]:
                  if to == parent:
                        pass
                  elif not visited[to]:
                        dfs(a_			,       a_			,       a_			,       id_							)
                        __SCREAMING_SNAKE_CASE       :str		    =  min(low[at]			,       low[to]							)
                        if id_ <= low[to]:
                              bridges.append((at, to) if at < to else (to, at)							)
                  else:
                        # This edge is a back edge and cannot be a bridge
                        __SCREAMING_SNAKE_CASE       :int		    =  min(low[at]			,       low[to]							)

      __SCREAMING_SNAKE_CASE       :list[tuple[int, int]]		    =  []
      for i in range(a_							):
            if not visited[i]:
                  dfs(a_			,       -1			,       a_			,       id_							)
      return bridges


if __name__ == "__main__":
  import doctest

  doctest.testmod()






"""simple docstring"""
import unittest

from datasets import load_dataset

from transformers.pipelines import pipeline
from transformers.testing_utils import is_pipeline_test, nested_simplify, require_torch, slow






@is_pipeline_test
@require_torch
class  _SCREAMING_SNAKE_CASE(       unittest.TestCase  ):




       @require_torch
       def    _UpperCamelCase					(						self							)      ->				str:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE       :Dict		    =  pipeline(
                 task='''zero-shot-audio-classification'''		,model='''hf-internal-testing/tiny-clap-htsat-unfused'''							)
             __SCREAMING_SNAKE_CASE       :Any		    =  load_dataset('''ashraq/esc50'''							)
             __SCREAMING_SNAKE_CASE       :int		    =  dataset['''train''']['''audio'''][-1]['''array''']
             __SCREAMING_SNAKE_CASE       :Dict		    =  audio_classifier(SCREAMING_SNAKE_CASE__		,candidate_labels=['''Sound of a dog''', '''Sound of vaccum cleaner''']							)
             self.assertEqual(
                 nested_simplify(SCREAMING_SNAKE_CASE__							)		,[{'''score''': 0.5_0_1, '''label''': '''Sound of a dog'''}, {'''score''': 0.4_9_9, '''label''': '''Sound of vaccum cleaner'''}]		,)




       @unittest.skip('''No models are available in TF'''							)
       def    _UpperCamelCase					(						self							)      ->				Optional[int]:





             """simple docstring"""






             pass




       @slow
       @require_torch
       def    _UpperCamelCase					(						self							)      ->				Tuple:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE       :Optional[int]		    =  pipeline(
                 task='''zero-shot-audio-classification'''		,model='''laion/clap-htsat-unfused'''		,)
             # This is an audio of a dog
             __SCREAMING_SNAKE_CASE       :List[Any]		    =  load_dataset('''ashraq/esc50'''							)
             __SCREAMING_SNAKE_CASE       :Tuple		    =  dataset['''train''']['''audio'''][-1]['''array''']
             __SCREAMING_SNAKE_CASE       :str		    =  audio_classifier(SCREAMING_SNAKE_CASE__		,candidate_labels=['''Sound of a dog''', '''Sound of vaccum cleaner''']							)

             self.assertEqual(
                 nested_simplify(SCREAMING_SNAKE_CASE__							)		,[
                     {'''score''': 0.9_9_9, '''label''': '''Sound of a dog'''},
                     {'''score''': 0.0_0_1, '''label''': '''Sound of vaccum cleaner'''},
                 ]		,)

             __SCREAMING_SNAKE_CASE       :Dict		    =  audio_classifier([audio] * 5		,candidate_labels=['''Sound of a dog''', '''Sound of vaccum cleaner''']							)
             self.assertEqual(
                 nested_simplify(SCREAMING_SNAKE_CASE__							)		,[
                     [
                         {'''score''': 0.9_9_9, '''label''': '''Sound of a dog'''},
                         {'''score''': 0.0_0_1, '''label''': '''Sound of vaccum cleaner'''},
                     ],
                 ]
                 * 5		,)
             __SCREAMING_SNAKE_CASE       :Union[str, Any]		    =  audio_classifier(
                 [audio] * 5		,candidate_labels=['''Sound of a dog''', '''Sound of vaccum cleaner''']		,batch_size=5							)
             self.assertEqual(
                 nested_simplify(SCREAMING_SNAKE_CASE__							)		,[
                     [
                         {'''score''': 0.9_9_9, '''label''': '''Sound of a dog'''},
                         {'''score''': 0.0_0_1, '''label''': '''Sound of vaccum cleaner'''},
                     ],
                 ]
                 * 5		,)




       @unittest.skip('''No models are available in TF'''							)
       def    _UpperCamelCase					(						self							)      ->				List[str]:





             """simple docstring"""






             pass