
import argparse


__magic_name__            =  '''docs/source/_static/js/custom.js'''





def 	SCREAMING_SNAKE_CASE__    (      __lowerCAmelCase							):
    with open(__lowerCAmelCase    ,		encoding="utf-8"    ,		newline="\n"							) as f:
        snake_case__						=				f.readlines()
    snake_case__						=				0

    # First let's put the right version
    while not lines[index].startswith("const stableVersion ="							):
        index += 1
    snake_case__						=				F"""const stableVersion = \"v{version}\"\n"""

    # Then update the dictionary
    while not lines[index].startswith("const versionMapping = {"							):
        index += 1

    # We go until the end
    while not lines[index].startswith("}"							):
        index += 1
    # We add the new version at the end
    lines[index - 1] += F"""    \"v{version}\": \"v{version}\",\n"""

    with open(__lowerCAmelCase    ,		"w"    ,		encoding="utf-8"    ,		newline="\n"							) as f:
        f.writelines(__lowerCAmelCase							)


if __name__ == "__main__":
     __magic_name__            =  argparse.ArgumentParser()
     parser.add_argument('''--version''', help='''Release version.''')
     __magic_name__            =  parser.parse_args()
     update_custom_js(args.version)





from __future__ import annotations





def 	SCREAMING_SNAKE_CASE__    (      __lowerCAmelCase    ,		__lowerCAmelCase							):
    snake_case__						,					snake_case__						=				set(__lowerCAmelCase							), [start]

    while stack:
        snake_case__						=				stack.pop()
        explored.add(__lowerCAmelCase							)
        # 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(__lowerCAmelCase							)
    return explored


__magic_name__            =  {
    '''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'''))



