"""simple docstring"""






import operator




def 						SCREAMING_SNAKE_CASE					(  __UpperCAmelCase  ,					__UpperCAmelCase = False  ,					__UpperCAmelCase = None       )							->   list:
				SCREAMING_SNAKE_CASE__		  =				operator.lt if reverse else operator.gt
				SCREAMING_SNAKE_CASE__		  =				solution or []

				if not arr:
								return solution

				SCREAMING_SNAKE_CASE__		  =				[arr.pop(0       )]
				for i, item in enumerate(__UpperCAmelCase       ):
								if _operator(__UpperCAmelCase  ,					sublist[-1]       ):
												sublist.append(__UpperCAmelCase       )
												arr.pop(__UpperCAmelCase       )

    #  merging sublist into solution list
				if not solution:
								solution.extend(__UpperCAmelCase       )
				else:
								while sublist:
												SCREAMING_SNAKE_CASE__		  =				sublist.pop(0       )
												for i, xx in enumerate(__UpperCAmelCase       ):
																if not _operator(__UpperCAmelCase  ,					__UpperCAmelCase       ):
																				solution.insert(__UpperCAmelCase  ,					__UpperCAmelCase       )
																				break
												else:
																solution.append(__UpperCAmelCase       )

				strand_sort(__UpperCAmelCase  ,					__UpperCAmelCase  ,					__UpperCAmelCase       )
				return solution


if __name__ == "__main__":
						assert strand_sort([4, 3, 5, 1, 2]) == [1, 2, 3, 4, 5]
						assert strand_sort([4, 3, 5, 1, 2], reverse=True) == [5, 4, 3, 2, 1]





"""simple docstring"""






import os

from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE, hf_cache_home


_A   					=    HUGGINGFACE_HUB_CACHE


_A   					=    'config.json'
_A   					=    'diffusion_pytorch_model.bin'
_A   					=    'diffusion_flax_model.msgpack'
_A   					=    'model.onnx'
_A   					=    'diffusion_pytorch_model.safetensors'
_A   					=    'weights.pb'
_A   					=    'https://huggingface.co'
_A   					=    default_cache_path
_A   					=    'diffusers_modules'
_A   					=    os.getenv('HF_MODULES_CACHE', os.path.join(hf_cache_home, 'modules'))
_A   					=    ['fp16', 'non-ema']
_A   					=    '.self_attn'




