




import operator as op


SCREAMING_SNAKE_CASE__     :     Union[str, Any]		    =       "scaler.pt"
SCREAMING_SNAKE_CASE__     :     str		    =       "pytorch_model"
SCREAMING_SNAKE_CASE__     :     List[str]		    =       "random_states"
SCREAMING_SNAKE_CASE__     :     List[str]		    =       "optimizer"
SCREAMING_SNAKE_CASE__     :     str		    =       "scheduler"
SCREAMING_SNAKE_CASE__     :     List[Any]		    =       "pytorch_model.bin"
SCREAMING_SNAKE_CASE__     :     Any		    =       "pytorch_model.bin.index.json"
SCREAMING_SNAKE_CASE__     :     Union[str, Any]		    =       "model.safetensors"
SCREAMING_SNAKE_CASE__     :     Any		    =       "model.safetensors.index.json"
SCREAMING_SNAKE_CASE__     :     Tuple		    =       "1.10.2"
SCREAMING_SNAKE_CASE__     :     Union[str, Any]		    =       "py38"
SCREAMING_SNAKE_CASE__     :     int		    =       "4.17.0"
SCREAMING_SNAKE_CASE__     :     Union[str, Any]		    =       ["ml.p3.16xlarge", "ml.p3dn.24xlarge", "ml.p4dn.24xlarge"]
SCREAMING_SNAKE_CASE__     :     Optional[int]		    =       ["FULL_SHARD", "SHARD_GRAD_OP", "NO_SHARD", "HYBRID_SHARD", "HYBRID_SHARD_ZERO2"]
SCREAMING_SNAKE_CASE__     :     Dict		    =       ["TRANSFORMER_BASED_WRAP", "SIZE_BASED_WRAP", "NO_WRAP"]
SCREAMING_SNAKE_CASE__     :     Optional[int]		    =       ["BACKWARD_PRE", "BACKWARD_POST", "NO_PREFETCH"]
SCREAMING_SNAKE_CASE__     :     Dict		    =       ["FULL_STATE_DICT", "LOCAL_STATE_DICT", "SHARDED_STATE_DICT"]
SCREAMING_SNAKE_CASE__     :     Tuple		    =       "2.0.1"
SCREAMING_SNAKE_CASE__     :     List[str]		    =       ["pdsh", "standard", "openmpi", "mvapich"]
SCREAMING_SNAKE_CASE__     :     Union[str, Any]		    =       ["default", "reduce-overhead", "max-autotune"]

SCREAMING_SNAKE_CASE__     :     int		    =       {">": op.gt, ">=": op.ge, "==": op.eq, "!=": op.ne, "<=": op.le, "<": op.lt}

# These are the args for `torch.distributed.launch` for pytorch < 1.9
SCREAMING_SNAKE_CASE__     :     Optional[int]		    =       [
    "nnodes",
    "nproc_per_node",
    "rdzv_backend",
    "rdzv_endpoint",
    "rdzv_id",
    "rdzv_conf",
    "standalone",
    "max_restarts",
    "monitor_interval",
    "start_method",
    "role",
    "module",
    "m",
    "no_python",
    "run_path",
    "log_dir",
    "r",
    "redirects",
    "t",
    "tee",
    "node_rank",
    "master_addr",
    "master_port",
]

SCREAMING_SNAKE_CASE__     :     List[Any]		    =       ["DEEPSPEED", "MULTI_GPU", "FSDP", "MEGATRON_LM"]
SCREAMING_SNAKE_CASE__     :     int		    =       ["DEEPSPEED", "MULTI_XPU", "FSDP"]






from __future__ import annotations

from typing import Any

def lowercase    (  SCREAMING_SNAKE_CASE )			->							None:


			'''simple docstring'''







			create_state_space_tree(SCREAMING_SNAKE_CASE       ,    []       ,    0 )

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


			'''simple docstring'''







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

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


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

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