in scripts/init-kernel.py [0:0]
def create_file_with_content(file_path: str, content: str):
"""Creates a file at 'file_path' with the specified content."""
directory = os.path.dirname(file_path)
if directory and not os.path.exists(directory):
os.makedirs(directory)
with open(file_path, "w") as f:
f.write(content)