


'''simple docstring'''
import operator as op


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

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

# These are the args for `torch.distributed.launch` for pytorch < 1.9
lowerCAmelCase						=					[
    """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""",
]

lowerCAmelCase						=					["""DEEPSPEED""", """MULTI_GPU""", """FSDP""", """MEGATRON_LM"""]
lowerCAmelCase						=					["""DEEPSPEED""", """MULTI_XPU""", """FSDP"""]









'''simple docstring'''
from __future__ import annotations

def 					lowerCamelCase_ ( __UpperCamelCase					:       dict							,    __UpperCamelCase					:       str		)					->	set[str]:







     """simple docstring"""
     _A		,				_A				=							set(__UpperCamelCase		), [start]

     while stack:
          _A				=							stack.pop()
          explored.add(__UpperCamelCase		)
          # Differences from BFS:
          # 1) pop last element instead of first one
          # 2) add adjacent elements to stack without exploring them
          for adj in reversed(graph[v]		):
               if adj not in explored:
                    stack.append(__UpperCamelCase		)
     return explored


lowerCAmelCase						=					{
    """A""": ["""B""", """C""", """D"""],
    """B""": ["""A""", """D""", """E"""],
    """C""": ["""A""", """F"""],
    """D""": ["""B""", """D"""],
    """E""": ["""B""", """F"""],
    """F""": ["""C""", """E""", """G"""],
    """G""": ["""F"""],
}

if __name__ == "__main__":
    import doctest

    doctest.testmod()
    print(depth_first_search(G, """A"""))





