def METHOD_NAME(argv: Sequence[str] = sys.argv[1:]):
    print('******************** BUILDING DOCUMENTATION **************************')
    os.chdir(SPHINX_DIR)
    try:
        RunAutoDoc()
        CleanupFilesNotWantedInDoc()
        RunScripts()
        if (len(argv)==1):
            GenerateHTMLorJSON(argv[0])
        GeneratePDF()
        DeleteSphinxCollateral()
    except Exception:
        return 1
    return 0