def write_file(content: bytes, output_path: str) -> None:
    """Write content to output_path, making sure any parent directories exist."""
    output_dir = os.path.dirname(output_path)
    os.makedirs(output_dir, exist_ok=True)
    with open(output_path, 'wb') as f:
        f.write(content)
Write content to output_path, making sure any parent directories exist.
mkdocs/utils/__init__.py