def METHOD_NAME(ctx: AnalysisContext) -> (Artifact, "write_json_cli_args"):
    """Generate the json file to pass runtime information to the VM"""
    runtime_json = ctx.actions.declare_output("runtime.json")
    runtime_json_args = ctx.actions.write_json(
        runtime_json,
        {
            "firmware": ctx.attrs.firmware,
            "qemu_img": ensure_single_output(ctx.attrs.qemu_img),
            "qemu_system": ensure_single_output(ctx.attrs.qemu_system),
            "roms_dir": ctx.attrs.roms_dir,
        },
        with_inputs = True,
    )
    return runtime_json, runtime_json_args