




'''simple docstring'''
from typing import Any
class   __UpperCAmelCase				:



					'''simple docstring'''





					def __init__(	self     :						Optional[int]      ,       _lowercase     :						Any)    ->							str:
								A_									= data
								A_									= None





class   __UpperCAmelCase				:



					'''simple docstring'''





					def __init__(	self     :						Any)    ->							Tuple:
								A_									= None



					def     __snake_case						(	self     :						Union[str, Any])    ->							List[str]:
								A_									= self.head
								while temp is not None:
											print(temp.data      ,       end=' ')
											A_									= temp.next
								print()



					def     __snake_case						(	self     :						Any      ,       _lowercase     :						Any)    ->							List[Any]:
								A_									= Node(_lowercase)
								A_									= self.head
								A_									= new_node



					def     __snake_case						(	self     :						Any      ,       _lowercase     :						Union[str, Any]      ,       _lowercase     :						str)    ->							List[str]:
								if node_data_a == node_data_a:
											return
								else:
											A_									= self.head
											while node_a is not None and node_a.data != node_data_a:
														A_									= node_a.next

											A_									= self.head
											while node_a is not None and node_a.data != node_data_a:
														A_									= node_a.next

											if node_a is None or node_a is None:
														return

											A_		, A_									= node_a.data, node_a.data


if __name__ == "__main__":
							_SCREAMING_SNAKE_CASE			=						LinkedList()
							for i in range(5, 0, -1):
														ll.push(i)

							ll.print_list()

							ll.swap_nodes(1, 4)
							print("After swapping")
							ll.print_list()










'''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   __UpperCAmelCase				(     unittest.TestCase				):



					'''simple docstring'''





					@require_torch
					def     __snake_case						(	self     :						str)    ->							Optional[int]:
								A_									= pipeline(
								    task='zero-shot-audio-classification'      ,       model='hf-internal-testing/tiny-clap-htsat-unfused')
								A_									= load_dataset('ashraq/esc50')
								A_									= dataset['train']['audio'][-1]['array']
								A_									= audio_classifier(_lowercase      ,       candidate_labels=['Sound of a dog', 'Sound of vaccum cleaner'])
								self.assertEqual(
								    nested_simplify(_lowercase)      ,       [{'score': 0.5_01, 'label': 'Sound of a dog'}, {'score': 0.4_99, 'label': 'Sound of vaccum cleaner'}]      ,       )



					@unittest.skip('No models are available in TF')
					def     __snake_case						(	self     :						Tuple)    ->							str:
								pass



					@slow
					@require_torch
					def     __snake_case						(	self     :						Optional[Any])    ->							Tuple:
								A_									= pipeline(
								    task='zero-shot-audio-classification'      ,       model='laion/clap-htsat-unfused'      ,       )
								# This is an audio of a dog
								A_									= load_dataset('ashraq/esc50')
								A_									= dataset['train']['audio'][-1]['array']
								A_									= audio_classifier(_lowercase      ,       candidate_labels=['Sound of a dog', 'Sound of vaccum cleaner'])

								self.assertEqual(
								    nested_simplify(_lowercase)      ,       [
								        {'score': 0.9_99, 'label': 'Sound of a dog'},
								        {'score': 0.0_01, 'label': 'Sound of vaccum cleaner'},
								    ]      ,       )

								A_									= audio_classifier([audio] * 5      ,       candidate_labels=['Sound of a dog', 'Sound of vaccum cleaner'])
								self.assertEqual(
								    nested_simplify(_lowercase)      ,       [
								        [
								            {'score': 0.9_99, 'label': 'Sound of a dog'},
								            {'score': 0.0_01, 'label': 'Sound of vaccum cleaner'},
								        ],
								    ]
								    * 5      ,       )
								A_									= audio_classifier(
								    [audio] * 5      ,       candidate_labels=['Sound of a dog', 'Sound of vaccum cleaner']      ,       batch_size=5)
								self.assertEqual(
								    nested_simplify(_lowercase)      ,       [
								        [
								            {'score': 0.9_99, 'label': 'Sound of a dog'},
								            {'score': 0.0_01, 'label': 'Sound of vaccum cleaner'},
								        ],
								    ]
								    * 5      ,       )



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




