


'''simple docstring'''







import unittest

from transformers.utils.backbone_utils import (
    BackboneMixin,
    get_aligned_output_features_output_indices,
    verify_out_features_out_indices,
)
class 	UpperCamelCase__					( unittest.TestCase	):



     """simple docstring"""






     def a	( self   ):

            '''simple docstring'''

            _lowerCAmelCase    :							Optional[int]   			=       ['a', 'b', 'c']

            # Defaults to last layer if both are None
            _lowerCAmelCase			,     _lowerCAmelCase    :							int   			=       get_aligned_output_features_output_indices(snake_case__      ,	snake_case__      ,	snake_case__   )
            self.assertEqual(snake_case__      ,	['c']   )
            self.assertEqual(snake_case__      ,	[2]   )

            # Out indices set to match out features
            _lowerCAmelCase			,     _lowerCAmelCase    :							Dict   			=       get_aligned_output_features_output_indices(['a', 'c']      ,	snake_case__      ,	snake_case__   )
            self.assertEqual(snake_case__      ,	['a', 'c']   )
            self.assertEqual(snake_case__      ,	[0, 2]   )

            # Out features set to match out indices
            _lowerCAmelCase			,     _lowerCAmelCase    :							str   			=       get_aligned_output_features_output_indices(snake_case__      ,	[0, 2]      ,	snake_case__   )
            self.assertEqual(snake_case__      ,	['a', 'c']   )
            self.assertEqual(snake_case__      ,	[0, 2]   )

            # Out features selected from negative indices
            _lowerCAmelCase			,     _lowerCAmelCase    :							Union[str, Any]   			=       get_aligned_output_features_output_indices(snake_case__      ,	[-3, -1]      ,	snake_case__   )
            self.assertEqual(snake_case__      ,	['a', 'c']   )
            self.assertEqual(snake_case__      ,	[-3, -1]   )







     def a	( self   ):

            '''simple docstring'''

            with self.assertRaises(snake_case__   ):
                   verify_out_features_out_indices(['a', 'b']      ,	(0, 1)      ,	snake_case__   )

            # Out features must be a list
            with self.assertRaises(snake_case__   ):
                   verify_out_features_out_indices(('a', 'b')      ,	(0, 1)      ,	['a', 'b']   )

            # Out features must be a subset of stage names
            with self.assertRaises(snake_case__   ):
                   verify_out_features_out_indices(['a', 'b']      ,	(0, 1)      ,	['a']   )

            # Out indices must be a list or tuple
            with self.assertRaises(snake_case__   ):
                   verify_out_features_out_indices(snake_case__      ,	0      ,	['a', 'b']   )

            # Out indices must be a subset of stage names
            with self.assertRaises(snake_case__   ):
                   verify_out_features_out_indices(snake_case__      ,	(0, 1)      ,	['a']   )

            # Out features and out indices must be the same length
            with self.assertRaises(snake_case__   ):
                   verify_out_features_out_indices(['a', 'b']      ,	(0,)      ,	['a', 'b', 'c']   )

            # Out features should match out indices
            with self.assertRaises(snake_case__   ):
                   verify_out_features_out_indices(['a', 'b']      ,	(0, 2)      ,	['a', 'b', 'c']   )

            # Out features and out indices should be in order
            with self.assertRaises(snake_case__   ):
                   verify_out_features_out_indices(['b', 'a']      ,	(0, 1)      ,	['a', 'b']   )

            # Check passes with valid inputs
            verify_out_features_out_indices(['a', 'b', 'd']      ,	(0, 1, -1)      ,	['a', 'b', 'c', 'd']   )







     def a	( self   ):

            '''simple docstring'''

            _lowerCAmelCase    :							int   			=       BackboneMixin()

            _lowerCAmelCase    :							Optional[int]   			=       ['a', 'b', 'c']
            _lowerCAmelCase    :							Tuple   			=       ['a', 'c']
            _lowerCAmelCase    :							Tuple   			=       [0, 2]

            # Check that the output features and indices are set correctly
            self.assertEqual(backbone.out_features      ,	['a', 'c']   )
            self.assertEqual(backbone.out_indices      ,	[0, 2]   )

            # Check out features and indices are updated correctly
            _lowerCAmelCase    :							Union[str, Any]   			=       ['a', 'b']
            self.assertEqual(backbone.out_features      ,	['a', 'b']   )
            self.assertEqual(backbone.out_indices      ,	[0, 1]   )

            _lowerCAmelCase    :							List[Any]   			=       [-3, -1]
            self.assertEqual(backbone.out_features      ,	['a', 'c']   )
            self.assertEqual(backbone.out_indices      ,	[-3, -1]   )





'''simple docstring'''







def 			lowercase				(_A					):







       """simple docstring"""







       _lowerCAmelCase    :							Dict   			=       len(_A					)
       while cur > 1:
              # Find the maximum number in arr
              _lowerCAmelCase    :							int   			=       arr.index(max(arr[0:cur]					)					)
              # Reverse from 0 to mi
              _lowerCAmelCase    :							Dict   			=       arr[mi::-1] + arr[mi + 1 : len(_A					)]
              # Reverse whole list
              _lowerCAmelCase    :							Optional[int]   			=       arr[cur - 1 :: -1] + arr[cur : len(_A					)]
              cur -= 1
       return arr


if __name__ == "__main__":
       lowerCAmelCase    :     Tuple					=						input("""Enter numbers separated by a comma:\n""").strip()
       lowerCAmelCase    :     Tuple					=						[int(item) for item in user_input.split(""",""")]
       print(pancake_sort(unsorted))

