in tools/url-checker/create_test_files.py [0:0]
def ensure_directory(directory):
"""Creates a directory if it doesn't exist."""
if not os.path.exists(directory):
os.makedirs(directory)
print(f"Created directory: {directory}")