




import os
from distutils.util import strtobool







def 			_a   (		SCREAMING_SNAKE_CASE_							:       Any   ,   SCREAMING_SNAKE_CASE_							:       int  ):
					for e in env_keys:
										__lowerCAmelCase            = int(os.environ.get(SCREAMING_SNAKE_CASE_   ,   -1  )  )
										if val >= 0:
															return val
					return default







def 			_a   (		SCREAMING_SNAKE_CASE_							:       List[Any]   ,   SCREAMING_SNAKE_CASE_							:       int=False  ):
					__lowerCAmelCase            = os.environ.get(SCREAMING_SNAKE_CASE_   ,   str(SCREAMING_SNAKE_CASE_  )  )
					return strtobool(SCREAMING_SNAKE_CASE_  ) == 1  # As its name indicates `strtobool` actually returns an int...







def 			_a   (		SCREAMING_SNAKE_CASE_							:       str   ,   SCREAMING_SNAKE_CASE_							:       Optional[int]="no"  ):
					__lowerCAmelCase            = os.environ.get(SCREAMING_SNAKE_CASE_   ,   str(SCREAMING_SNAKE_CASE_  )  )
					return value










import os


# All paths are set with the intent you should run this script from the root of the repo with the command
# python utils/check_doctest_list.py
UpperCamelCase__					    =    """."""


if __name__ == "__main__":
					UpperCamelCase__					    =    os.path.join(REPO_PATH, """utils/documentation_tests.txt""")
					UpperCamelCase__					    =    []
					UpperCamelCase__					    =    []
					with open(doctest_file_path) as fp:
										for line in fp:
															UpperCamelCase__					    =    line.strip()
															UpperCamelCase__					    =    os.path.join(REPO_PATH, line)
															if not (os.path.isfile(path) or os.path.isdir(path)):
																				non_existent_paths.append(line)
															all_paths.append(path)
					if len(non_existent_paths) > 0:
										UpperCamelCase__					    =    """\n""".join(non_existent_paths)
										raise ValueError(f'''`utils/documentation_tests.txt` contains non-existent paths:\n{non_existent_paths}''')
					if all_paths != sorted(all_paths):
										raise ValueError("""Files in `utils/documentation_tests.txt` are not in alphabetical order.""")




