
"""simple docstring"""







import os
from pathlib import Path
def     __lowerCAmelCase				():
	from torch.utils.cpp_extension import load

	__lowerCAmelCase			:						Dict									=      Path(_UpperCamelCase		).resolve().parent.parent.parent / 'kernels' / 'deformable_detr'
	__lowerCAmelCase			:						int									=      [
	    root / filename
	    for filename in [
	        'vision.cpp',
	        os.path.join('cpu'       ,  'ms_deform_attn_cpu.cpp'		),
	        os.path.join('cuda'       ,  'ms_deform_attn_cuda.cu'		),
	    ]
	]

	load(
	    'MultiScaleDeformableAttention'       ,  _UpperCamelCase       ,  with_cuda=_UpperCamelCase       ,  extra_include_paths=[str(_UpperCamelCase		)]       ,  extra_cflags=['-DWITH_CUDA=1']       ,  extra_cuda_cflags=[
	        '-DCUDA_HAS_FP16=1',
	        '-D__CUDA_NO_HALF_OPERATORS__',
	        '-D__CUDA_NO_HALF_CONVERSIONS__',
	        '-D__CUDA_NO_HALF2_OPERATORS__',
	    ]       ,  )

	import MultiScaleDeformableAttention as MSDA

	return MSDA






from __future__ import annotations

from typing import Any


def        SCREAMING_SNAKE_CASE      (       _UpperCAmelCase )			->     None:
    create_state_space_tree(_UpperCAmelCase						,	[]						,	0 )


def        SCREAMING_SNAKE_CASE      (       _UpperCAmelCase						,	_UpperCAmelCase						,	_UpperCAmelCase )			->     None:

    if index == len(_UpperCAmelCase ):
        print(_UpperCAmelCase )
        return

    create_state_space_tree(_UpperCAmelCase						,	_UpperCAmelCase						,	index + 1 )
    current_subsequence.append(sequence[index] )
    create_state_space_tree(_UpperCAmelCase						,	_UpperCAmelCase						,	index + 1 )
    current_subsequence.pop()


if __name__ == "__main__":
    _UpperCAmelCase				:       list[Any]	   =				[3, 1, 2, 4]
    generate_all_subsequences(seq)

    seq.clear()
    seq.extend(["""A""", """B""", """C"""])
    generate_all_subsequences(seq)





