def METHOD_NAME(root: Path, path: str, size: int = 0) -> Path:
    file_path = root / path
    file_path.parent.mkdir(parents=True, exist_ok=True)
    with open(file_path, 'wb') as file:
        file.write(b'\0' * size)
    return file_path